CVE-2025-12421
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedMattermost versions 11.0.x <= 11.0.2, 10.12.x <= 10.12.1, 10.11.x <= 10.11.4, 10.5.x <= 10.5.12 fail to to verify that the token used during the code exchange originates from the same authentication flow, which allows an authenticated user to perform account takeover via a specially crafted email address used when switching authentication methods and sending a request to the /users/login/sso/code-exchange endpoint. The vulnerability requires ExperimentalEnableAuthenticationTransfer to be enabled (default: enabled) and RequireEmailVerification to be disabled (default: disabled).
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceMattermost fails to validate token origin consistency during SSO code exchange, allowing authenticated attackers to hijack other user accounts by manipulating email addresses during authentication method switches and sending requests to the /users/login/sso/code-exchange endpoint. The vulnerability requires ExperimentalEnableAuthenticationTransfer enabled (default) and RequireEmailVerification disabled (default).
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 10.5.0, < 10.5.13>= 10.11.0, < 10.11.5>= 10.12.0, < 10.12.2>= 11.0.0, < 11.0.3CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check Mattermost Server versionRun 'mattermost version' or inspect the version via the system console at /about or via API call to /api/v4/system/analytics/0?name=systemAffected if Installed version falls within >=10.5.0/<10.5.13, >=10.11.0/<10.11.5, >=10.12.0/<10.12.2, or >=11.0.0/<11.0.3
-
Verify ExperimentalEnableAuthenticationTransfer settingQuery the configuration via 'mattermost config show | grep ExperimentalEnableAuthenticationTransfer' or check in System Console under Environment > Developer, or query the config API endpointAffected if The setting value is true or not explicitly set to false (defaults to enabled)
-
Verify RequireEmailVerification settingQuery the configuration via 'mattermost config show | grep RequireEmailVerification' or check in System Console under Authentication > Email, or query the config API endpointAffected if The setting value is false (defaults to disabled)
-
Confirm SSO authentication methods in useCheck System Console under Authentication section to see if multiple SSO methods (e.g., GitLab, OIDC, SAML, Google, Office 365) are configured and enabledAffected if More than one SAML/OIDC/SSO provider is enabled, allowing authentication method switching
User is affected if running an affected version AND ExperimentalEnableAuthenticationTransfer is enabled AND RequireEmailVerification is disabled AND multiple SSO authentication methods are configured.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped10.5.1310.11.510.12.2
Disable ExperimentalEnableAuthenticationTransfer and enable RequireEmailVerification in system settings, or upgrade to patched versions beyond 11.0.2, 10.12.1, 10.11.4, and 10.5.12.
Upgrade to 10.5.13 (if on 10.5.x), 10.11.5 (if on 10.11.x), 10.12.2 (if on 10.12.x), or 11.0.3 (if on 11.0.x) - choose the latest stable release in your minor version branch
- 1. Identify the currently running Mattermost Server version using the system console or mmctl command
- 2. Determine the appropriate upgrade path based on current version (see upgrade_path field)
- 3. Before upgrading, review Mattermost upgrade documentation and ensure backup of database and configuration
- 4. For the upgrade, download the specific fixed version from the official Mattermost releases page (github.com/mattermost/mattermost-server/releases)
- 5. Follow Mattermost's standard upgrade procedure: stop the server, replace the binary, run database migrations if required, then restart the server
- 6. After upgrade, verify the server starts successfully and check system console for any errors
- 7. Optionally, as a defense-in-depth measure, disable ExperimentalEnableAuthenticationTransfer in System Console > Authentication > Enable Authentication Transfer (set to false)
- 8. Optionally, enable RequireEmailVerification in System Console > Authentication > Email Verification (set to true)
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation1.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,696.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-12421 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-12421 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data