A MongoDB security patch is simple on paper, but it is easy to miss one component. The October 2026 alerts cover the database server, the mongosh shell, the Database Tools package and the PyMongo driver. Our tech team tested the full patch on a single-node lab replica set, audited each component before and after, and took a backup in between. This walkthrough shows those steps, so you can run the same checks on your own estate. For more on our MongoDB work, see our MongoDB practice page (https://www.geopits.com/technologies/mongodb).
What the October alerts fixed
We compared each installed version with the fixed version named in the alert.
This walkthrough targets 8.0.34, the release that fixes the three server alerts. MongoDB has since released 8.0.37 and 8.0.38, which carry further security fixes. Before you choose a target for production, check the latest 8.0 release notes.
The starting point
The lab runs MongoDB 8.0.23 as a single-node replica set, bound to localhost, with authorization and keyFile enabled. Before patching, an audit script compares each installed component with its fixed version. The server, mongosh, Database Tools and PyMongo all show as AFFECTED.


Walkthrough
Step 1. Take a backup before anything changes
Take a consistent backup with mongodump --oplog before you change anything. An exit code of 0 means the dump succeeded.
mongodump --uri="$LAB_URI" --oplog --gzip --out=$HOME/lab/backup

Step 2. Upgrade mongosh
Upgrade mongosh from 2.13.0 to 2.14.1. This fixes CVE-2026-115930, a certificate trust issue.
npm install -g --silent --prefix ~/lab/mongosh mongosh@2.14.1

Step 3. Upgrade the PyMongo driver
Upgrade PyMongo to the latest release, which covers the BSON and connection-string CVEs (CVE-2026-96748, CVE-2026-96749 and CVE-2026-106435).
python -m pip install --quiet --upgrade pymongo

Step 4. Upgrade Database Tools
Upgrade Database Tools from 100.10.0 to 100.20.0. This fixes CVE-2026-116641.
curl -fsSLO https://fastdl.mongodb.org/tools/db/mongodb-database-tools-$OSV-x86_64-100.20.0.tgz

Step 5. Patch the server
Patch the server from 8.0.23 to 8.0.34. Stop the server, swap the binaries and restart it with the same configuration. This fixes CVE-2026-104004, CVE-2026-103965 and CVE-2026-96297. In production, run this as a rolling upgrade, starting with the secondaries.
mongosh --quiet "$LAB_URI" --eval 'db.getSiblingDB("admin").shutdownServer()'curl -fsSLO https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-$OSV-8.0.34.tgzmongod -f mongod.conf

Step 6. Audit again
A re-audit after patching shows every component as PATCHED. The server reports 8.0.34, mongosh 2.14.1, Database Tools 100.20.0 and PyMongo 4.20.0.

Limits to know
- Check each alert for its fixed version before you pick a target. The alert is the source, not this post.
- On a replica set, use a rolling upgrade and start with the secondaries, so the set keeps a primary during the work.
- Take a backup before you change any component. This walkthrough uses mongodump with --oplog.
- The server patch here is 8.0.34. MongoDB has released 8.0.37 and 8.0.38 since then.
Where it fits in a DBA's day
Security alerts arrive in batches and touch more than the server. The audit in this walkthrough checks every component in one run, so a missed driver or shell shows up before it becomes a finding. Pair patch work with your high availability plan, and review how you log and audit database activity (see our guide to important aspects of database security: https://www.geopits.com/blog/important-aspects-of-database-security).
Wrapping up
Patching is routine when the steps are clear: back up, upgrade every component, then audit again. If your team wants a second pair of eyes on the next alert cycle, talk to us. We can run a database audit before you patch, and our DBA managed services cover the routine work after. Start with a free database audit at https://www.geopits.com/get-free-db-audit, or reach us at https://www.geopits.com/contact. You can also read more on the Geopits blog at https://www.geopits.com/blog.
FAQ
1. Do I need a backup before patching MongoDB?
Yes. Take a consistent backup before you change any component. This walkthrough uses mongodump with --oplog.
2. Why patch the shell and drivers, not only the server?
The October alerts name mongosh, Database Tools and the PyMongo driver as affected, so each one needs its own fixed version.
3. Can I upgrade a production replica set in one go?
No. Use a rolling upgrade, starting with the secondaries, so the set keeps a primary during the work.
4. Which MongoDB 8.0 version should I target?
This walkthrough uses 8.0.34, the release that fixes the server alerts. MongoDB has since released 8.0.37 and 8.0.38, so check the latest 8.0 release notes before you choose a target.
5. How do I check which versions I run?
Use the audit in this walkthrough, or run mongod --version, mongosh --version, mongodump --version, and python -c "import pymongo; print(pymongo.version)".
Related reading
- Security features in MongoDB: https://www.geopits.com/blog/security-features-in-mongo-db
- Queryable encryption in MongoDB: https://www.geopits.com/blog/intro-to-queryable-encryption-in-mongodb
- MongoDB replication and sharding: https://www.geopits.com/blog/mongodb-replication-and-sharding
- High availability and disaster recovery services: https://www.geopits.com/service/high-availability-disaster-recovery-services
Sources
MongoDB security alerts (https://www.mongodb.com/resources/products/alerts/) and MongoDB 8.0 release notes (https://www.mongodb.com/docs/manual/release-notes/8.0/).


