CVE-2024-6383
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 · uneditedThe bson_string_append function in MongoDB C Driver may be vulnerable to a buffer overflow where the function might attempt to allocate too small of buffer and may lead to memory corruption of neighbouring heap memory. This issue affects libbson versions prior to 1.27.1
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 confidenceThe bson_string_append function in libbson (MongoDB C Driver) contains a buffer allocation bug where it calculates and allocates a buffer smaller than required for string append operations. This causes a heap-based buffer overflow, corrupting adjacent memory and potentially leading to crashes or undefined behavior. The vulnerability affects all versions prior to 1.27.1.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
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
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
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.
-
Locate the installed libbson librarySearch for libbson shared objects (.so on Linux, .dll on Windows, .dylib on macOS) or static libraries in common paths such as /usr/lib, /usr/local/lib, or within the application's dependencies. Also check for bson.h header file which accompanies libbson.Affected if libbson library files are found on the system or within an application's dependency tree
-
Identify the libbson versionRun 'pkg-config --modversion libbson' if available, or check the library filename which may contain the version (e.g., libbson-1.0.so), or inspect the bson.h header for a BSON_VERSION or similar version macro, or use 'strings' on the library binary to search for version strings like '1.27' or '1.2'Affected if The version number returned is lower than 1.27.1, or no version string is found (indicating an older unversioned release)
-
Verify the application links against libbsonFor a deployed application, run 'ldd <application_binary>' on Linux or 'otool -L <application_binary>' on macOS to list linked libraries and confirm libbson is dynamically linked, or check build artifacts and dependency manifests for libbson references.Affected if The application or service depends on a vulnerable version of libbson (version prior to 1.27.1)
-
Confirm usage of bson_string_appendIf source code is available, search for calls to bson_string_append, bson_string_new, or related bson string construction functions. In binary analysis, use 'nm' or 'objdump' to check if the application links against bson_string_append symbol.Affected if The codebase or binary invokes the vulnerable bson_string_append function, which triggers the buffer allocation flaw
The environment is affected if libbson version 1.27.1 or later is not in use, and the application or library code makes use of the bson_string_append function from that vulnerable libbson version.
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 · scopedUpgrade libbson to version 1.27.1 or later to obtain the patched version. If immediate upgrading is not feasible, audit all call sites to bson_string_append and implement bounds checking on input sizes as a temporary mitigation until the library can be updated.
libbson 1.27.1
- Identify the current version of libbson (libmongoc) in your environment by checking your package manager or dependencies
- Stop any MongoDB C Driver applications or services that are running
- Update libbson to version 1.27.1 or later using your package manager (e.g., apt-get update && apt-get install libbson-1.0, yum update libbson, or pip/cargo depending on your dependency management)
- If using a package manager that doesn't have 1.27.1 yet, download the source from the MongoDB C Driver releases page and rebuild
- Verify the installed version matches or exceeds 1.27.1
- Restart the application or service
- Run your test suite to verify functionality
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation2.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,752.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-6383 — 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-2024-6383 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