English edition · cyberattaques.org in FrenchFrançais
Vulnerability

MongoDB PHP Driver: PLAIN authentication flaw fixed in 1.21.16, 2.1.16 and 2.5.10

CERT-FR reports a vulnerability in the MongoDB PHP Driver that allows a security policy bypass, tied to NUL-byte injection in PLAIN authentication credentials. PHP applications using the 1.21, 2.1 and 2.5 driver branches before the fixed releases are concerned.

What to do now Illustration photo (database server authentication)

On 4 December 2026, CERT-FR published advisory CERTFR-2026-AVI-1670 about a vulnerability in the MongoDB PHP Driver, the component PHP applications use to talk to MongoDB databases. The agency describes the risk as a security policy bypass and points to the vendor's own record, ticket PHPC-2818, dated 3 December 2026.

Three branches are affected: 1.21.x before 1.21.16, 2.1.x before 2.1.16 and 2.5.x before 2.5.10. MongoDB's ticket, marked resolved on 2 December 2026, lists those three releases as the fixed versions.

The vendor ticket explains what changed. Credential validation now forbids NUL characters in the username and password used with the PLAIN authentication mechanism. The ticket is linked to a MongoDB C driver issue titled "Authentication identity smuggling via NUL-byte injection in SASL PLAIN payload". In practice, before the fix, a NUL byte slipped into the credentials could alter the identity actually presented to the server during authentication.

Neither document spells out the exact conditions for exploitation. Exposure would logically depend on an attacker being able to influence the username or password handed to the driver, for instance where an application builds credentials or a connection string from external input, and on the PLAIN mechanism being in use. No CVE identifier is given, and the sources do not say whether the flaw has been exploited.

The fix is part of a change to the specification shared by MongoDB drivers (ticket DRIVERS-3599), which suggests other MongoDB drivers are receiving a similar change; the CERT-FR advisory, however, covers only the PHP driver.

Teams running PHP applications connected to MongoDB, especially with PLAIN authentication, which is commonly used with LDAP directories, are the most directly concerned and should schedule the driver upgrade.

Action plan

What to do now

  1. Inventory the MongoDB PHP Driver extension version on every server and container image.
  2. Upgrade to 1.21.16, 2.1.16 or 2.5.10 depending on the branch in use.
  3. Check whether your applications use PLAIN authentication and whether any credentials can come from unfiltered external input.
  4. As general good practice, reject control characters in any user-supplied credential before passing it to the driver.

Sources