Bug 2273859 (CVE-2024-21506)

Summary: CVE-2024-21506 python-pymongo: out of bounds read
Product: [Other] Security Response Reporter: ybuenos
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: athomas, bbuckingham, bcourt, eglynn, ehelms, jjoyce, jschluet, jsherril, lhh, lsvaty, lzap, mburns, mgarciac, mhulan, mmagr, nmoumoul, orabin, pcreech, pgrist, rchan, rhos-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-pymongo 4.6.3 Doc Type: ---
Doc Text:
An out-of-bounds read vulnerability was found in Pymongo. When using a crafted payload, this flaw allows an attacker to force the parser to deserialize unmanaged memory.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2273864, 2273860, 2273863, 2273865, 2273866, 2273867, 2273868, 2273869    
Bug Blocks: 2273862    

Description ybuenos 2024-04-07 14:03:33 UTC
Versions of the package pymongo before 4.6.3 are vulnerable to Out-of-bounds Read in the bson module. Using the crafted payload the attacker could force the parser to deserialize unmanaged memory. The parser tries to interpret bytes next to buffer and throws an exception with string. If the following bytes are not printable UTF-8 the parser throws an exception with a single byte.

https://gist.github.com/keltecc/62a7c2bf74a997d0a7b48a0ff3853a03
https://github.com/mongodb/mongo-python-driver/commit/56b6b6dbc267d365d97c037082369dabf37405d2
https://security.snyk.io/vuln/SNYK-PYTHON-PYMONGO-6370597

Comment 1 ybuenos 2024-04-07 14:03:50 UTC
Created python-pymongo tracking bugs for this issue:

Affects: fedora-all [bug 2273860]

Comment 2 ybuenos 2024-04-07 14:06:53 UTC
Created python-pdfminer tracking bugs for this issue:

Affects: epel-all [bug 2273863]
Affects: fedora-all [bug 2273865]


Created python-pymongo tracking bugs for this issue:

Affects: epel-all [bug 2273864]