PHP object injection via unsuppressible __pclass class inference in command monitoring events
Medium6.3CVE-2026-96745 · Published Sep 24, 2026
### Impact Deserialization of untrusted data in the command monitoring support of the MongoDB PHP Driver can cause class names embedded in document content to be honored when the driver builds monitoring event objects. When an application registers a command monitoring subscriber and includes untrusted data in a database operation, an unauthenticated party who controls that data may cause an application class implementing the driver's persistable interface to be instantiated and its unserialization method invoked with the supplied data. The resulting impact depends on the classes available in the application. ### Patches Fixed in 1.21.10, 2.1.10, 2.5.3 ### Workarounds Can check BSON does not contain `__pclass` fields. ### References https://jira.mongodb.org/browse/PHPC-2743
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| mongodb Product | < 1.21.10 | 1.21.10 |
| >= 2.0.0, < 2.1.10 | 2.1.10 | |
| >= 2.2.0, < 2.5.3 | 2.5.3 | |
| mongodb/mongodb-extension Product | < 1.21.10 | 1.21.10 |
| >= 2.0.0, < 2.1.10 | 2.1.10 | |
| >= 2.2.0, < 2.5.3 | 2.5.3 |
Details and references
- CVSS 4.0
- CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
- Severity from
- GitHub (reviewed advisory)
More MongoDB advisories
All MongoDB| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Sep 24 | PYTHON-5996 Heap out-of-bounds write via signed size overflow in BSON document encoding | High7.5 | 4.18.2 |
| Sep 24 | PYTHON-5986 Host injection in PyMongo connection string parsing via percent-encoded delimiters | High8.3 | 4.18.2 |
| Sep 24 | MongoDB: improper input validation | Medium5.3 | 4.18.2 |
| Sep 24 | Improper neutralization of special elements in data query logic in the cache... | High7.1 | 5.11.0 |
| Sep 24 | MongoDB Compass: code injection | High7.3 | 1.49.12 |
| Sep 24 | Heap buffer overflow via mid-scan command list growth in client topology monitoring | High8.3 | 1.30.12+1 more |