Summary
The MongoDB PHP Driver extension performs an invalid memory release (CWE-763) when certain string-typed options or type-mapping settings are given non-string values, corrupting the PHP process memory.
Per the CVSS vector (7.8, high), the attack is local: the attacker must be able to run PHP code in a process that loads the extension, with low privileges, no user interaction and no special conditions. Successful exploitation may allow reading or modifying process memory, executing commands as the PHP process user, or crashing the process.
The vulnerability is not listed in the CISA KEV catalog, and EPSS data is not available.
Who is affected
Organizations using MongoDB PHP Driver versions 1.0.0 through 1.21.14, 2.0.0 through 2.1.14, or 2.2.0 through 2.5.8, especially shared hosting or systems where multiple parties can run PHP code.
What to do
- Upgrade the MongoDB PHP Driver to a fixed version: 1.21.15 (1.x branch), 2.1.15 (2.0–2.1 branch) or 2.5.9 (2.2+ branch).
- Check the installed extension version (e.g. php --ri mongodb or phpinfo()) on all servers and container images.
- After upgrading, restart PHP-FPM, the web server or other PHP processes so the new extension is loaded.
- Until patched, restrict who can run PHP code on affected systems and validate option and type map values passed to the driver.
- Follow the vendor's official advisory for details: https://jira.mongodb.org/browse/PHPC-2746
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Regular user
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
- CWE-763 Release of Invalid Pointer or Reference
References
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.