pymongo vulnerabilities

PyMongo - the Official MongoDB Python driver

Registry
PyPI
Latest
4.20.0
License
Apache-2.0

7 known advisories

The latest version, 4.20.0, is not affected by any of them. Projects on older versions may be.

Update to the latest version:pip install 'pymongo>=4.20.0'

Is your project on an affected pymongo?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Security advisories for pymongo

  • HighCVE-2026-106435GHSA-98qm-wvgf-w4cf27 Oct 2026

    MongoDB Python Driver: Out-of-bounds read in BSON decoding via a malformed Regex element

    Affected
    >=3.9.0 <4.18.3
    Fixed in
    4.18.3
  • HighCVE-2026-96749GHSA-v4x9-3549-crwv5 Oct 2026

    PyMongo: PYTHON-5996 Heap out-of-bounds write via signed size overflow in BSON document encoding

    Affected
    <4.18.2
    Fixed in
    4.18.2
  • HighCVE-2026-96748GHSA-vp6j-j7w5-5xjj5 Oct 2026

    PyMongo: PYTHON-5986 Host injection in PyMongo connection string parsing via percent-encoded delimiters

    Affected
    >=3.5.0 <4.18.2
    Fixed in
    4.18.2
  • MediumCVE-2026-96747GHSA-qx36-8mw2-4r3x5 Oct 2026

    PyMongo: PYTHON-5990 Forced Unix domain socket connection via a .sock KMS endpoint in client-side field level encryption

    Affected
    >=3.9.0 <4.18.2
    Fixed in
    4.18.2
  • MediumCVE-2026-88029GHSA-8fvv-fgr5-f8ch5 Oct 2026

    pymongo: PYTHON-5994 Use exact match for file ID in GridFS delete methods

    Affected
    <4.18.1
    Fixed in
    4.18.1
  • MediumCVE-2024-5629GHSA-m87m-mmvp-v9qm5 Jun 2024

    PyMongo Out-of-bounds Read in the bson module

    Affected
    <4.6.3
    Fixed in
    4.6.3
  • MediumCVE-2013-2132GHSA-x33v-f3gp-gw2c14 May 2022

    Use of NullPointerException Catch to Detect NULL Pointer Dereference in Pymongo

    Affected
    <2.5.2
    Fixed in
    2.5.2

Is your pymongo version vulnerable?

Which of your client projects still run an old pymongo?

NPMscan reads the requirements.txt, poetry.lock, uv.lock and Pipfile.lock in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other PyPI packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the PyPI registry.