Intel

AIKIDO-2026-10026

pymongo is vulnerable to Insertion of Sensitive Information into Log File

Insertion of Sensitive Information into Log File Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jan 12, 2026

25

Low Risk

This Affects:

PYTHONpymongo
4.11 - 4.15.5
Fixed in 4.16.0
Are you affected? Scan for Free

TL;DR

Affected versions of the package may expose sensitive information in log files because invalid documents are included directly in bson.errors.InvalidDocument error messages. This behavior can leak user-provided or sensitive data when errors are logged, rather than safely storing the invalid document separately on the exception object.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

pymongo is vulnerable to Insertion of Sensitive Information into Log File in versions 4.11 - 4.15.5.

How to fix this

Upgrade the pymongo library to the patch version.