Skip to main content
Menu
Advisories

Credential exposure via unmasked connection string in driver parse-error messages for the PHP driver

GHSA-X6PV-MCM6-FXC8Published Updated GitHub

Description

Impact

The MongoDB PHP extension includes the full connection string it was given in the error it raises when that string cannot be parsed. A party able to influence any part of the connection string, including a part that holds no secret, can cause the resulting message to carry credentials into the application's standard error output and log files. This may result in unintended disclosure of authentication material to anyone able to read that output.

Patches

Fixed in MongoDB PHP Driver 1.21.14, 2.1.14, and 2.5.8. Users should upgrade to a patched release.

Workarounds

None known. Until upgrading, treat PHP error output and logs as sensitive.

References

Affected versions

References

GitHub · mongodb/mongo-php-driver