pymongo — security advisory
An integer overflow in the BSON document encoding component of the MongoDB Python Driver's bundled native extension may occur when a single document is built from an unusually large amount of caller-supplied data. Size arithmetic is performed in a signed 32-bit type, and the guard meant to catch the overflow is written in a form whose behavior is not defined by the C language standard. A party with no privileges who can place a very large value into data that an application encodes may, depending on how the native extension was built, cause a write outside the bounds of an allocated buffer inside the application's own process.
- Products
- pymongo
- Affected versions
- 2.6-1, 2.6.2-1, 2.6.3-1, 2.6.3-1build1, 3.0.3-1, 3.10.1-0ubuntu2, 3.10.1-0ubuntu2.1, 3.11.0-1build2, 3.11.0-1build3, 3.11.0-1build4, 3.11.0-1build6, 3.11.0-1build7, 3.11.0-1build8, 3.11.0-1ubuntu0.22.04.1, 3.11.0-1ubuntu0.24.04.1, 3.2-1, 3.2-1build1, 3.2-1ubuntu0.1~esm1, 3.4.0-1build2, 3.6.1+dfsg1-1, 3.6.1+dfsg1-1ubuntu0.1~esm1, 3.7.1-1.1, 3.7.1-1.1build1, 4.10.1-6, 4.15.3-1, 4.15.3-2, 4.15.5-1, 4.16.0-1, 4.16.0-1build1, 4.17.0-1
- Fixed versions
- Not specified
- CVEs
- CVE-2026-96749
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 03:35 UTC · Revision 1
Source evidence
An integer overflow in the BSON document encoding component of the MongoDB Python Driver's bundled native extension may occur when a single document is built from an unusually large amount of caller-supplied data. Size arithmetic is performed in a signed 32-bit type, and the guard meant to catch the overflow is written in a form whose behavior is not defined by the C language standard. A party with no privileges who can place a very large value into data that an application encodes may, depending on how the native extension was built, cause a write outside the bounds of an allocated buffer inside the application's own process.
osv:UBUNTU-CVE-2026-96749
pymongo
Fixed versions: Not specified
pymongo
Fixed versions: Not specified
pymongo
Fixed versions: Not specified
pymongo
Fixed versions: Not specified
pymongo
Fixed versions: Not specified
pymongo
Fixed versions: Not specified
pymongo
Fixed versions: Not specified
pymongo
Fixed versions: Not specified
Complete source record
{
"id": "6c8ca8eae9990b5e406999b2b15ae02047dd7806037acaa6842d363bd8754208",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-96749",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2026-96749",
"summary": "An integer overflow in the BSON document encoding component of the MongoDB Python Driver's bundled native extension may occur when a single document is built from an unusually large amount of caller-supplied data. Size arithmetic is performed in a signed 32-bit type, and the guard meant to catch the overflow is written in a form whose behavior is not defined by the C language standard. A party with no privileges who can place a very large value into data that an application encodes may, depending on how the native extension was built, cause a write outside the bounds of an allocated buffer inside the application's own process.",
"evidence": "osv:UBUNTU-CVE-2026-96749",
"products": [
{
"name": {
"value": "pymongo",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.6-1",
"evidence": "/affected/0/versions"
},
{
"value": "2.6.2-1",
"evidence": "/affected/0/versions"
},
{
"value": "2.6.3-1",
"evidence": "/affected/0/versions"
},
{
"value": "2.6.3-1build1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "pymongo",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.0.3-1",
"evidence": "/affected/1/versions"
},
{
"value": "3.2-1",
"evidence": "/affected/1/versions"
},
{
"value": "3.2-1build1",
"evidence": "/affected/1/versions"
},
{
"value": "3.2-1ubuntu0.1~esm1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "pymongo",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.4.0-1build2",
"evidence": "/affected/2/versions"
},
{
"value": "3.6.1+dfsg1-1",
"evidence": "/affected/2/versions"
},
{
"value": "3.6.1+dfsg1-1ubuntu0.1~esm1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "pymongo",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.7.1-1.1",
"evidence": "/affected/3/versions"
},
{
"value": "3.7.1-1.1build1",
"evidence": "/affected/3/versions"
},
{
"value": "3.10.1-0ubuntu2",
"evidence": "/affected/3/versions"
},
{
"value": "3.10.1-0ubuntu2.1",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "pymongo",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.11.0-1build2",
"evidence": "/affected/4/versions"
},
{
"value": "3.11.0-1build3",
"evidence": "/affected/4/versions"
},
{
"value": "3.11.0-1build4",
"evidence": "/affected/4/versions"
},
{
"value": "3.11.0-1ubuntu0.22.04.1",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "pymongo",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.11.0-1build6",
"evidence": "/affected/5/versions"
},
{
"value": "3.11.0-1build7",
"evidence": "/affected/5/versions"
},
{
"value": "3.11.0-1build8",
"evidence": "/affected/5/versions"
},
{
"value": "3.11.0-1ubuntu0.24.04.1",
"evidence": "/affected/5/versions"
}
]
},
{
"name": {
"value": "pymongo",
"evidence": "/affected/6/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.16.0-1build1",
"evidence": "/affected/6/versions"
},
{
"value": "4.17.0-1",
"evidence": "/affected/6/versions"
}
]
},
{
"name": {
"value": "pymongo",
"evidence": "/affected/7/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.10.1-6",
"evidence": "/affected/7/versions"
},
{
"value": "4.15.3-1",
"evidence": "/affected/7/versions"
},
{
"value": "4.15.3-2",
"evidence": "/affected/7/versions"
},
{
"value": "4.15.5-1",
"evidence": "/affected/7/versions"
},
{
"value": "4.16.0-1",
"evidence": "/affected/7/versions"
},
{
"value": "4.16.0-1build1",
"evidence": "/affected/7/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "UBUNTU-CVE-2026-96749",
"aliases": [
"UBUNTU-CVE-2026-96749"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
},
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymongo",
"purl": "pkg:deb/ubuntu/pymongo?arch=source&distro=trusty",
"ecosystem": "Ubuntu:14.04:LTS"
},
"versions": [
"2.6-1",
"2.6.2-1",
"2.6.3-1",
"2.6.3-1build1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-96749.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python-bson",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python-bson-ext",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python-gridfs",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python-pymongo",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python-pymongo-ext",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python3-bson",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python3-bson-ext",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python3-gridfs",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python3-pymongo",
"binary_version": "2.6.3-1build1"
},
{
"binary_name": "python3-pymongo-ext",
"binary_version": "2.6.3-1build1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymongo",
"purl": "pkg:deb/ubuntu/pymongo?arch=source&distro=esm-infra%2Fxenial",
"ecosystem": "Ubuntu:Pro:16.04:LTS"
},
"versions": [
"3.0.3-1",
"3.2-1",
"3.2-1build1",
"3.2-1ubuntu0.1~esm1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-96749.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python-bson",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python-bson-ext",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python-gridfs",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python-pymongo",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python-pymongo-ext",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-bson",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-bson-ext",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-gridfs",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-pymongo",
"binary_version": "3.2-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-pymongo-ext",
"binary_version": "3.2-1ubuntu0.1~esm1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymongo",
"purl": "pkg:deb/ubuntu/pymongo?arch=source&distro=esm-infra%2Fbionic",
"ecosystem": "Ubuntu:Pro:18.04:LTS"
},
"versions": [
"3.4.0-1build2",
"3.6.1+dfsg1-1",
"3.6.1+dfsg1-1ubuntu0.1~esm1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-96749.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python-bson",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python-bson-ext",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python-gridfs",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python-pymongo",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python-pymongo-ext",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-bson",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-bson-ext",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-gridfs",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-pymongo",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-pymongo-ext",
"binary_version": "3.6.1+dfsg1-1ubuntu0.1~esm1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymongo",
"purl": "pkg:deb/ubuntu/pymongo?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"3.7.1-1.1",
"3.7.1-1.1build1",
"3.10.1-0ubuntu2",
"3.10.1-0ubuntu2.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-96749.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-bson",
"binary_version": "3.10.1-0ubuntu2.1"
},
{
"binary_name": "python3-bson-ext",
"binary_version": "3.10.1-0ubuntu2.1"
},
{
"binary_name": "python3-gridfs",
"binary_version": "3.10.1-0ubuntu2.1"
},
{
"binary_name": "python3-pymongo",
"binary_version": "3.10.1-0ubuntu2.1"
},
{
"binary_name": "python3-pymongo-ext",
"binary_version": "3.10.1-0ubuntu2.1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymongo",
"purl": "pkg:deb/ubuntu/pymongo?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"3.11.0-1build2",
"3.11.0-1build3",
"3.11.0-1build4",
"3.11.0-1ubuntu0.22.04.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-96749.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-bson",
"binary_version": "3.11.0-1ubuntu0.22.04.1"
},
{
"binary_name": "python3-bson-ext",
"binary_version": "3.11.0-1ubuntu0.22.04.1"
},
{
"binary_name": "python3-gridfs",
"binary_version": "3.11.0-1ubuntu0.22.04.1"
},
{
"binary_name": "python3-pymongo",
"binary_version": "3.11.0-1ubuntu0.22.04.1"
},
{
"binary_name": "python3-pymongo-ext",
"binary_version": "3.11.0-1ubuntu0.22.04.1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymongo",
"purl": "pkg:deb/ubuntu/pymongo?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"3.11.0-1build6",
"3.11.0-1build7",
"3.11.0-1build8",
"3.11.0-1ubuntu0.24.04.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-96749.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-bson",
"binary_version": "3.11.0-1ubuntu0.24.04.1"
},
{
"binary_name": "python3-bson-ext",
"binary_version": "3.11.0-1ubuntu0.24.04.1"
},
{
"binary_name": "python3-gridfs",
"binary_version": "3.11.0-1ubuntu0.24.04.1"
},
{
"binary_name": "python3-pymongo",
"binary_version": "3.11.0-1ubuntu0.24.04.1"
},
{
"binary_name": "python3-pymongo-ext",
"binary_version": "3.11.0-1ubuntu0.24.04.1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymongo",
"purl": "pkg:deb/ubuntu/pymongo?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"4.16.0-1build1",
"4.17.0-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-96749.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-bson",
"binary_version": "4.17.0-1"
},
{
"binary_name": "python3-bson-ext",
"binary_version": "4.17.0-1"
},
{
"binary_name": "python3-gridfs",
"binary_version": "4.17.0-1"
},
{
"binary_name": "python3-pymongo",
"binary_version": "4.17.0-1"
},
{
"binary_name": "python3-pymongo-ext",
"binary_version": "4.17.0-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pymongo",
"purl": "pkg:deb/ubuntu/pymongo?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"4.10.1-6",
"4.15.3-1",
"4.15.3-2",
"4.15.5-1",
"4.16.0-1",
"4.16.0-1build1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-96749.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-bson",
"binary_version": "4.16.0-1build1"
},
{
"binary_name": "python3-bson-ext",
"binary_version": "4.16.0-1build1"
},
{
"binary_name": "python3-gridfs",
"binary_version": "4.16.0-1build1"
},
{
"binary_name": "python3-pymongo",
"binary_version": "4.16.0-1build1"
},
{
"binary_name": "python3-pymongo-ext",
"binary_version": "4.16.0-1build1"
}
]
}
}
],
"modified": "2026-10-17T13:01:20.158692880Z",
"provider": "osv",
"upstream": [
"CVE-2026-96749"
],
"references": [
"https://ubuntu.com/security/CVE-2026-96749",
"https://www.cve.org/CVERecord?id=CVE-2026-96749"
]
},
"related_cves": [
{
"value": "CVE-2026-96749",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 361744,
"published_at": "2026-09-24T19:17:00+00:00"
}