CVE-2024-6381
MongoDB C Driver bson_strfreev may be susceptible to integer overflow
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
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.0
MongoDB C Driver bson_strfreev may be susceptible to integer overflow
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
- Record
CVE-2024-6381- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-680
- Updated
- 2026-11-02
EUVDEUVD-2024-47488
4.0
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
- Record
EUVD-2024-47488- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vc2m-fm8c-xx2j
4.0
The bson_strfreev function in the MongoDB C driver library may be susceptible to an integer...
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
- Record
GHSA-vc2m-fm8c-xx2j- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-680
- Updated
- 2026-11-02
NVD
4.0
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
- Record
CVE-2024-6381- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-680
- Updated
- 2026-11-02
OSV
4.0
MongoDB C Driver bson_strfreev may be susceptible to integer overflow
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
- Record
CVE-2024-6381- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-680
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-6381
5.3
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
- Record
DEBIAN-CVE-2024-6381- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
OSVOESA-2024-1891
4.0
mongo-c-driver security update
mongo-c-driver is a project that includes two libraries: libmongoc, a client library written in C for MongoDB. libbson, a library providing useful routines related to building, parsing, and iterating BSON documents.
Security Fix(es):
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(CVE-2024-6381)
- Record
OESA-2024-1891- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-6381
4.0
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
- Record
UBUNTU-CVE-2024-6381- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-02
OSVUSN-7613-1 No score
mongo-c-driver vulnerabilities
Karman Liu discovered that mongo-c-driver did not correctly handle certain memory operations. An attacker could possibly use this issue to cause a denial of service or execute arbitrary code. (CVE-2024-6381)
Karman Liu discovered that mongo-c-driver did not correctly handle certain memory operations. An attacker could possibly use this issue to cause a denial of service or execute arbitrary code. This issue only affected Ubuntu 24.04 LTS. (CVE-2024-6383, CVE-2025-0755)
- Record
USN-7613-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libbson-xs-perlDebian:12 |
before 0.8.4-2+deb12u1, plus listed versions 0.8.4-2 |
0.8.4-2+deb12u1 |
mongo-c-driverDebian:12 |
before 1.23.1-1+deb12u1, plus listed versions 1.23.1-1 |
1.23.1-1+deb12u1 |
mongo-c-driverDebian:13 |
before 1.26.2-1 | 1.26.2-1 |
mongo-c-driverDebian:14 |
before 1.26.2-1 | 1.26.2-1 |
libbson-xs-perlDebian:11 From an advisory covering 6 CVEs |
before 0.8.4-1+deb11u1, plus listed versions 0.8.4-1 |
0.8.4-1+deb11u1 |
mongo-c-driverDebian:11 From an advisory covering 5 CVEs |
before 1.17.6-1+deb11u1, plus listed versions 1.17.6-1 |
1.17.6-1+deb11u1 |
mongo-c-driveropenEuler:22.03-LTS-SP4 |
before 1.27.4-1.oe2203sp4 | 1.27.4-1.oe2203sp4 |
mongo-c-driveropenEuler:22.03-LTS-SP3 |
before 1.27.4-1.oe2203sp3 | 1.27.4-1.oe2203sp3 |
mongo-c-driveropenEuler:20.03-LTS-SP4 |
before 1.27.4-1.oe2003sp4 | 1.27.4-1.oe2003sp4 |
mongo-c-driveropenEuler:22.03-LTS-SP1 |
before 1.27.4-1.oe2203sp1 | 1.27.4-1.oe2203sp1 |
Show 9 moreShow less
| Package | Affected | Fixed |
|---|---|---|
mongo-c-driveropenEuler:24.03-LTS |
before 1.27.4-1.oe2403 | 1.27.4-1.oe2403 |
libbsonUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 1.3.1-11.3.1-1ubuntu0.1~esm1 |
None known |
libbsonUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 1.8.0-11.8.1-11.9.0-11.9.2-11.9.2-1ubuntu0.1~esm2 |
None known |
mongo-c-driverUbuntu:Pro:20.04:LTS |
before 1.16.1-1ubuntu0.1~esm1, plus listed versions 1.15.0-11.15.1-11.15.2-11.16.0-11.16.1-11.16.1-1build11.16.1-1build2 |
1.16.1-1ubuntu0.1~esm1 |
mongo-c-driverUbuntu:Pro:22.04:LTS |
before 1.21.0-1ubuntu0.1~esm1, plus listed versions 1.18.0-11.19.1-11.19.2-11.20.0-11.20.0-1build11.20.1-11.21.0-11.21.0-1build1 |
1.21.0-1ubuntu0.1~esm1 |
mongo-c-driverUbuntu:Pro:24.04:LTS |
before 1.26.0-1.1ubuntu2+esm1, plus listed versions 1.24.3-11.24.4-11.25.1-11.25.2-11.25.4-11.26.0-11.26.0-1.1ubuntu11.26.0-1.1ubuntu2 |
1.26.0-1.1ubuntu2+esm1 |
mongo-c-driverUbuntu:Pro:20.04:LTS From an advisory covering 3 CVEs |
before 1.16.1-1ubuntu0.1~esm1, plus listed versions 1.15.0-11.15.1-11.15.2-11.16.0-11.16.1-11.16.1-1build11.16.1-1build2 |
1.16.1-1ubuntu0.1~esm1 |
mongo-c-driverUbuntu:Pro:22.04:LTS From an advisory covering 3 CVEs |
before 1.21.0-1ubuntu0.1~esm1, plus listed versions 1.18.0-11.19.1-11.19.2-11.20.0-11.20.0-1build11.20.1-11.21.0-11.21.0-1build1 |
1.21.0-1ubuntu0.1~esm1 |
mongo-c-driverUbuntu:Pro:24.04:LTS From an advisory covering 3 CVEs |
before 1.26.0-1.1ubuntu2+esm1, plus listed versions 1.24.3-11.24.4-11.25.1-11.25.2-11.25.4-11.26.0-11.26.0-1.1ubuntu11.26.0-1.1ubuntu2 |
1.26.0-1.1ubuntu2+esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-6381 is a medium vulnerability (CVSS 4.0) in Mongodb Libbson, published July 2, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.39%, the 33rd percentile. Fixed in libbson-xs-perl 0.8.4-2+deb12u1.
References
jira.mongodb.org/browse/CDRIVER-5622
lists.debian.org/debian-lts-announce/2025/05/msg00027.html
lists.debian.org/debian-lts-announce/2025/05/msg00012.html
nvd.nist.gov/vuln/detail/CVE-2024-6381
github.com/advisories/GHSA-vc2m-fm8c-xx2j
github.com/CVEProject/cvelistV5/tree/main/cves/2024/6xxx/CVE-2024-6381.json