Skip to main content
CVE-2024-6381VulnerabilityPublished Updated

CVE-2024-6381: MongoDB libbson · Integer Overflow to Buffer Overflow

Affects MongoDB libbsonSource CVE Database V5

0

Not known to be exploited · CVSS 4.0 Medium : upgrade to 1.26.2 when convenient.

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.1 base score
4.0Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 33% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 1.26.2
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 2 Jul 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.

What to do

Upgrade MongoDB libbson to 1.26.2.

Affected software

ProductAffectedFixed in
MongoDB Inc libbsonAffected
  • =0
  • <1.26.2
Fixed in
  • 1.26.2

AI-suggested

1. Immediately upgrade libbson to version 1.26.2 or later, which contains the fix for this vulnerability. 2. Audit all applications and services using the MongoDB C driver or libbson to identify usage of the bson_strfreev function or related string freeing operations. 3. Restrict local access to systems running vulnerable versions to trusted users only, minimizing the risk of local exploitation. 4. Implement memory safety and integrity monitoring tools to detect abnormal memory operations or crashes that could indicate exploitation attempts. 5. Incorporate static and dynamic code analysis in development pipelines to detect unsafe integer operations and buffer handling issues in custom code interfacing with libbson. 6. For containerized or virtualized environments, ensure base images are updated to include patched libbson versions. 7. Monitor vendor advisories and security bulletins for any emerging exploit code or additional patches related to this vulnerability. 8. Educate developers and system administrators about the risks of integer overflows leading to buffer overflows and encourage secure coding practices.

Description

The bson_strfreev function in the MongoDB C driver library may be susceptible to an integer overflow where the function will try to free memory at a negative offset. This may result in memory corruption. This issue affected libbson versions prior to 1.26.2

References

Community reviews

Loading reviews…