MongoDBDatabase / datastore

CVE-2025-12657

MEDIUM · 5.5 CVSS v3.1 Published 2025-11-03
Fix available
A fix is available. Upgrade to 7.0.22 / 8.0.10 or later.
See remediation →
61/100
Remediation priority · Elevated
Remotely reachable Zero-click

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 · unedited
The KMIP response parser built into mongo binaries is overly tolerant of certain malformed packets, and may parse them into invalid objects. Later reads of this object can result in read access violations.

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 · moderate confidence

The KMIP response parser in MongoDB binaries improperly handles malformed packets by being overly tolerant during parsing, creating invalid objects that can trigger read access violations when subsequently accessed. This represents a parsing validation flaw in the KMIP protocol implementation that could lead to information disclosure or denial of service.

MitigationApply MongoDB security patches when available; in the interim, restrict network exposure of KMIP interfaces and monitor for unexpected process behavior. Consider disabling KMIP functionality if not required.

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
MongoDBDatabase / datastore
Affected:>= 6.0.0, < 7.0.22>= 8.0.0, < 8.0.10

CVSS 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
High
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/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 checks

Work through these to decide whether this CVE applies to you.

  1. Determine installed MongoDB version
    Run 'db.version()' in the mongo shell or execute 'mongod --version' from the command line
    Affected if The reported version falls within the affected ranges: >= 6.0.0 and < 7.0.22, OR >= 8.0.0 and < 8.0.10
  2. Identify if KMIP is configured
    Inspect the MongoDB configuration file (typically /etc/mongod.conf) for 'kmip' sections, or run 'db.adminCommand({getParameter: 1, kmsProviders: 1})' to check for KMIP provider configuration
    Affected if KMIP is explicitly configured as a key management option in the MongoDB configuration
  3. Check for active KMIP server connectivity
    Review MongoDB logs for KMIP-related connection attempts or errors, or query 'db.adminCommand({serverStatus: 1}).security' for KMIP statistics
    Affected if MongoDB is actively attempting to communicate with a KMIP server or has active KMIP sessions
  4. Verify KMIP interface network exposure
    Review network configuration and firewall rules to determine if the KMIP interface port (commonly port 5696) is exposed to network segments
    Affected if The KMIP interface is network-accessible beyond trusted management networks (this indicates potential attack surface, though the flaw still requires KMIP to be configured)
  5. Review recent KMIP-related errors in logs
    Examine MongoDB log files (typically in /var/log/mongodb/) for entries containing 'KMIP', 'parse', or 'invalid' that may indicate malformed packet handling issues
    Affected if KMIP-related error messages appear in logs suggesting packet handling problems

You are affected if your MongoDB version is within the vulnerable ranges AND you have KMIP functionality configured and actively in use.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Upgrade available Upgrade to 7.0.22 / 8.0.10 or later
Fixed in 7.0.228.0.10
Interim mitigation

Apply MongoDB security patches when available; in the interim, restrict network exposure of KMIP interfaces and monitor for unexpected process behavior. Consider disabling KMIP functionality if not required.

Recommended fix High confidence

7.0.22 or 8.0.10 (depending on major version branch)

  1. 1. Identify the currently installed MongoDB version using: db.version() or mongod --version
  2. 2. For MongoDB 6.0.x deployments: Upgrade to version 7.0.22 or later
  3. 3. For MongoDB 7.0.x deployments: Upgrade to version 7.0.22 or later
  4. 4. For MongoDB 8.0.x deployments: Upgrade to version 8.0.10 or later
  5. 5. Follow standard MongoDB upgrade procedures including backup and testing in non-production environment first
  6. 6. After upgrade, verify the KMIP functionality works correctly with the new version
Caveat Minor point releases typically have minimal breaking changes; however, always review MongoDB release notes before upgrading

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in MongoDB Scoped from the published advisory
  • Consultation3.0 h
  • Implementation8.0 h
  • Testing5.0 h
  • Review / QA3.0 h
19.0 hours of engineering $3,330
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,328.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-12657 — 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-12657 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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