MongoDBDatabase / datastore

CVE-2024-8207

MEDIUM · 6.7 CVSS v3.1 Published 2024-08-27
Fix available
A fix is available. Upgrade to 5.0.14 / 6.0.3 or later.
See remediation →
69/100
Remediation priority · Elevated
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
In certain highly specific configurations of the host system and MongoDB server binary installation on Linux Operating Systems, it may be possible for a unintended actor with host-level access to cause the MongoDB Server binary to load unintended actor-controlled shared libraries when the server binary is started, potentially resulting in the unintended actor gaining full control over the MongoDB server process. This issue affects MongoDB Server v5.0 versions prior to 5.0.14 and MongoDB Server v6.0 versions prior to 6.0.3. Required Configuration: Only environments with Linux as the underlying operating system is affected by this issue

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

A shared library loading vulnerability in MongoDB Server on Linux allows an attacker with host-level access to inject malicious shared libraries during server startup, potentially achieving full control over the MongoDB process. The issue requires specific host system and MongoDB installation configurations to be exploitable.

MitigationUpgrade MongoDB Server to v5.0.14+ or v6.0.3+ and review host system access controls to prevent unauthorized users from influencing library loading paths.

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:>= 5.0.0, < 5.0.14>= 6.0.0, < 6.0.3>= 6.1.0, < 6.1.1

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

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

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

  1. Check installed MongoDB version
    Run 'mongod --version' or 'mongo --version' to get the server version
    Affected if Version is 5.0.0 to 5.0.13, 6.0.0 to 6.0.2, or 6.1.0
  2. Check for world-writable directories in MongoDB installation path
    Inspect the MongoDB installation directory (typically /usr/bin/mongodb or /opt/mongodb) for world-writable subdirectories where the mongod process has write access
    Affected if Any directory in the MongoDB binary path is world-writable and could be used to place malicious libraries
  3. Check LD_LIBRARY_PATH environment variable usage
    Review systemd service files or init scripts for MongoDB (located in /etc/systemd/system/ or /etc/init.d/) to see if LD_LIBRARY_PATH is set or if the MongoDB process runs with elevated privileges that could allow library injection
    Affected if LD_LIBRARY_PATH is configured or the service runs with privileges that allow writing to library load paths
  4. Check for MongoDB configuration file ownership and permissions
    Examine /etc/mongod.conf and any included configuration files for weak permissions (world-writable) or configuration that specifies custom library paths
    Affected if Configuration files are writable by non-privileged users or specify custom library loading paths
  5. Check MongoDB process environment
    Run 'ps aux | grep mongod' to find the running process, then check /proc/<pid>/environ for environment variables related to library loading paths
    Affected if Environment variables like LD_PRELOAD, LD_LIBRARY_PATH, or custom library paths are present in the MongoDB process environment

You are affected if your MongoDB version falls within the affected ranges AND the MongoDB installation or configuration allows writable paths that could be exploited for library injection by local users.

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 5.0.14 / 6.0.3 / 6.1.1 or later
Fixed in 5.0.146.0.36.1.1
Interim mitigation

Upgrade MongoDB Server to v5.0.14+ or v6.0.3+ and review host system access controls to prevent unauthorized users from influencing library loading paths.

Recommended fix High confidence

Upgrade to MongoDB Server 5.0.14, 6.0.3, or 6.1.1 (depending on your current major version branch)

  1. 1. Identify current MongoDB version by running: db.version() in mongosh or `mongod --version`
  2. 2. Determine which upgrade path applies based on your current major version (5.0.x → 5.0.14, 6.0.x → 6.0.3, or 6.1.x → 6.1.1)
  3. 3. Create a full backup of all MongoDB databases before upgrading
  4. 4. Stop the MongoDB server instance
  5. 5. For package-managed installations (yum/apt): update MongoDB packages to the fixed version (5.0.14, 6.0.3, or 6.1.1). For example: `sudo apt-get install mongodb-org=5.0.14` or `sudo yum install mongodb-org-5.0.14`
  6. 6. Ensure package version pins are updated to prevent automatic downgrade: add version hold or create a preferences file
  7. 7. Start the MongoDB server
  8. 8. Verify the new version is running: `db.version()` should show 5.0.14, 6.0.3, or 6.1.1
Caveat Standard MongoDB upgrade considerations apply: review breaking changes in release notes, test in staging first, and ensure compatibility with application drivers

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

Fix this in MongoDB Scoped from the published advisory
  • Consultation4.0 h
  • Implementation4.0 h
  • Testing6.0 h
  • Review / QA2.0 h
16.0 hours of engineering $2,780
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-8207 — 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-2024-8207 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