r/mongodb

CVE-2026-8053 in MongoDB time-series — affects you even if your app doesn't use time-series collections

Disclosure up front: I work at Percona. Posting this because the framing in some of the chatter I'm seeing about CVE-2026-8053 is going to leave many teams exposed.

The bug in one line: out-of-bounds memory write in MongoDB's time-series bucket catalog. An authenticated user with the readWrite role on any database can trigger it via a crafted sequence of operations against a time-series collection. CVSS v3.1 8.8, v4.0 8.7. Upstream tracking: SERVER-126021.

Why is the prerequisite weaker than it looks?

The advisory says the attacker needs database write privileges. That's accurate, but in practice, it means the built-in readWrite role, which is what most application accounts already hold.

So an attacker who lifts an application credential — from a CI log, a .env file, a compromised pod, an ex-employee's laptop — does not need your deployment to already host a time-series collection. They can create one on the spot and reach the vulnerable code path.

If your team is currently in the "we don't use time-series, we're fine" conversation, that's not the mitigation it sounds like. The only meaningful options are patching or restricting readWrite role to your application accounts (which most apps will break if you do it at runtime).

Fixed versions

  • MongoDB Server (upstream): see SERVER-126021 for the fixed versions for each major release; fixes are available from 5.0 to 8.3.
  • Percona Server for MongoDB:
    • 7.0.34-19 — May 20, 2026
    • 8.0.23-10 — May 21, 2026
    • 6.0.x patch — targeted for May 25, 2026
  • 5.x: no binary packages, but the fix is on the public release branch release-5.0.33-26 if you need to build it.

If you're running PSMDB on Kubernetes via the Percona Operator, you don't need to wait for an operator release — trigger the upgrade in the nearest possible maintenance window.

What I'd actually do today

  1. Patch on whichever schedule matches your major version.
  2. Audit custom roles. Anything granting readWrite to application accounts is, until you patch, an RCE primitive in waiting. Decide whether those accounts really need to write at runtime or whether they can be scoped to a known set.
  3. If you haven't already, enable MongoDB auditing for createCollection events. Useful for spotting unexpected time-series collection creation in the window before everyone is patched.

I am happy to answer any questions in the thread.

If you want the longer write-up — including the operational case that "authenticated RCE" deserves more urgency than it usually gets — I wrote it up on the Percona blog: https://www.percona.com/blog/cve-2026-8053-we-dont-use-time-series-is-not-a-mitigation/

reddit.com
u/NiceReflection454 — 1 day ago

mongodb-atlas-local in GitHub Actions CI: mongot indexing takes 6-15s per spec even on empty collections — any tricks to speed it up?

Hey everyone,

We're running integration tests against mongodb/mongodb-atlas-local:8.0.4 in GitHub Actions and hitting a painful flakiness/performance problem caused by Atlas Search indexing latency. Looking for anyone who's solved this.

Setup

- Rails + Mongoid test suite, ~500+ specs that use $search

- 9 parallel job matrix on ubuntu-latest, each spins up its own mongodb-atlas-local service container

- Ruby polling helper that queries the Atlas Search index every 0.2s until the record appears (up to 15s timeout)

Problem

After inserting a document, it takes anywhere from 2 to 12+ seconds before it's visible via $search, even on an empty test database with a handful of documents. On local dev (Mac M1/M2) it's consistently under 1 second.

We understand why this happens:

- mongot (the Atlas Search indexer inside the image) is a JVM/Lucene process that starts cold on every CI job

- JVM startup + JIT warmup takes a few seconds before mongot can even process the first oplog entry

- Then the Lucene flush cycle writes segments to virtualized disk, which is 3-5x slower than NVMe

- With 9 parallel jobs on potentially the same physical host, disk I/O contention makes it worse

The result: many of our Atlas Search specs sit waiting for up to 15 seconds. It's making CI significantly slower and more expensive.

What we've already tried / ruled out

- ✅ Polling instead of fixed sleep — fixed flakiness but not the latency itself

- ✅ Waiting for the correct "last inserted" record (not an arbitrary count)

- ❌ Tuning mongot sync/flush interval — couldn't find any exposed config for this in mongodb-atlas-local

- ❌ Sharing one MongoDB container across partitions — breaks test isolation

Happy to share our polling helper implementation if useful for anyone hitting the same issue.

Any advice from teams running Atlas Search in CI at scale would be really appreciated.

reddit.com
u/Far_Childhood_7829 — 2 days ago

After Completing My MongoDB Course, I’m Planning 100 Advanced MongoDB Problems

GitHub Repo: https://github.com/vivekpandey76/mongodb-notes

Recently completed my full MongoDB course with videos + detailed notes covering aggregation, indexing, schema design, transactions, optimization, and more.

Now planning to start a new series:
“100 MongoDB Complex Problems”

The goal is to solve real-world backend/database challenges in the most optimized and production-ready way instead of only basic CRUD tutorials.

Would love to know:

  • what MongoDB topics developers struggle with most
  • interesting real-world problems to include
  • things rarely explained properly in tutorials

Feedback and suggestions are welcome 🚀

reddit.com
u/Vivekpandey76 — 4 days ago
▲ 15 r/mongodb

New MongoDB GUI on the block: Monghoul

Last year I decided to start a fun side project - a love child of VS Code and NoSQLBooster.

I wanted a GUI that looks modern and snappy, minimal, not like 2003 MS Excel with dozens of buttons and dropdowns everywhere. I also wanted it to have a smart autocomplete that actually knows a schema, not just keys of the current collection, but their types and enum values. I wanted to type find({status: "}) and see "pending", "active", "cancelled" in the autocomplete suggestions. So I built it.

As a tech stack, I chose Tauri for the shell, Bun for the sidecar running the MongoDB driver and a tRPC server, and react, tailwind, react-query for the UI. The installer is around 33 MB.

Below is a breakdown of the main features.

Editor

  • supports not only single queries, but full scripts, in that case you must provide a return statement with results
  • injects helpers to the editor's global scope, like dayjs, luxon, faker, lodash, with autocomplete support for their APIs. Also has an id() helper.
  • automatically detects collections in your queries (including $lookup.from) and samples documents to extract field paths, types, and enum values. It does it only once per collection, but you can refresh it manually with a larger dataset.
  • uses Monaco editor with a custom completion provider that runs multiple phases of suggestions based on context (collection names, operators, stage snippets, field-aware suggestions, etc.)
  • after a $lookup, $group, $replaceRoot, $facet, $let, etc. the autocomplete updates in real time to match the new document shape. Indexed fields get priority. It just gets what you’re doing. For example, when you write a $lookup it suggest collection names for the "form" field and then suggests the foreign collection fields in the next stages. Or when you define a variable with $let, that variable becomes available in the autocomplete suggestions for the rest of the pipeline, same for $group _id subfields, $project inclusions, etc.
  • has "explain" button that shows the explain plan with index suggestions and one-click create index
  • aggregation builder mode with drag-and-drop stages, live per-stage preview, a dedicated $lookup helper form, bidirectional sync with the code editor, run-to-here, auto-preview, undo/redo - the whole thing. Uses the same autocomplete engine as the code editor, so you get schema-aware suggestions in the builder too.
  • nice date helper popover where you can quickly pick a date or range with a timezone support, it generates a date code snippet to copy-paste into the editor
  • write protection that detects destructive operations (like db.collection.drop(), deleteMany({}), etc.) and shows a confirmation window to prevent accidents (must be enabled in settings)
  • protection against running queries without limit(), it caps the result to 1000 documents and shows a warning, with an option to load more

Result viewer

  • Result header includes the badge with an execution plan
  • Table view: pinning columns, reordering, inline editing with enum suggested (my favorite), click to sort, documents diff. You can hover a cell with a nested data and see a data preview popover, if you click that cell it opens an expandable sticky tree below the row which supports inline edits too.
  • Tree view: perfect for deeply nested documents, with inline editing and sticky headers for better readability.
  • JSON view: readonly Monaco editor with your results
  • Explain view: shows the explain plan in a readable format, with index suggestions and one-click index creation.
  • Charts view: visualizes your data with bar, line, pie, scatter charts, with flexible grouping and aggregation options, supports export to PNG.
  • You column reorders, resizes, documents per page selection, query result, gets persisted across sessions (and gets saved to favorites if you pin the query)

Workspace

  • multi-tab and multi-panel layout with a drag-and-drop support
  • open tab in a new window
  • sidebar with favorite queries, pinned collections and a connection tree
  • every sidebar section has a support for folders and drag-and-drop reordering
  • global search modal that can search across all your queries and collections, with fuzzy matching
  • closed tabs can be restored via Ctrl+Shift+T, just like in a browser

Connections tree actions

  • db and collection import/export (with progress and cancellation), index/validation rules CRUD, size calculations
  • connections/collections/indexes/schemas have a dedicated popovers on hover with a summary
  • configurable schema analysis, you can specify the amount of documents, enum detection parameters. After the analysis you can manually provide missed enums if needed.
  • data generator: faker.js based tool to generate realistic test data with custom distributions, supports nested objects and arrays. Gets prefilled settings based on detected schema.
  • collections have a snippets section with common queries (can be customized)
  • open a cluster monitor tab for a connection, it shows real-time sparklines for operations, connections, memory usage, etc. Also has a live log of slow queries with explain plan links and a kill button.

MCP

You can enable the MCP server and allow your favorite AI agent to control the app. It can create and execute queries, build charts, organize you workspace, even generate a theme for you or search for closed tabs. There's a review mode so that any AI-generated query gets staged for your approval before execution (just waits for you to execute the tab code).

Themes

  • 10 beautiful built-in themes (2 of them are not so beautiful but high contrast)
  • theme editor with live preview, font selection, and the ability to export/import themes as JSON files to share with friends
  • ability to generate a theme using 3 seed colors
u/_monghoul_ — 7 days ago
▲ 25 r/mongodb+4 crossposts

paradedb/benchmarker: a workload agnostic, multi-backend benchmarking tool.

Hi r/postgresql!

We just open sourced ParadeDB Benchmarker, a multi-backend benchmarking framework built on top of the excellent Grafana k6 (blog post).

One of the goals was avoiding a shared query abstraction layer. PostgreSQL queries stay PostgreSQL queries, with their own driver and native SQL.

Supports PostgreSQL, Elasticsearch, OpenSearch, ClickHouse, MongoDB, and ParadeDB with:

  • mixed read/write workloads
  • support for docker-compose profiles per backend
  • dataset loader
  • config and setup capture
  • live metrics + exported reports

One of the ah-ha moments I had building this was using the pgx Go driver in anger for the first time, I'm a Rust guy, but I'm seriously impressed with pgx and what it can do.

Any comments welcome, we will be using this to benchmark ParadeDB, but you can write your own datasets and workloads which have nothing to do with full-text search.

github.com
u/jamesgresql — 9 days ago

Kill queries from specific AppName that runs longer than X minutes

Hello,

I have some users that are not so technical, but connect to the database regularly to extract some data.

However, sometimes they write really bad queries, or search for keys that don't exist in any document, leading to a client timeout -- however, the query continues running in the database backend for minutes. Sometimes for more than 10 minutes.

And almost everytime the users tend to insist on resubmitting the same query because the client timed out, leading to a few executions of the same query for the same amount of time..

I was thinking of a configuring some kind of kill switch for queries that run longer than X minutes, and are originated from specific appNames, for example mongoDB Compass

I am trying to avoid using maxTimeMS() as it's a global trigger, and I don't want to affect backend processes that are OK to have longer execution times, like heavy reporting and scheduled cronjobs.

reddit.com
u/Amazing_Key_9932 — 10 days ago

Seeking a use case for a MongoDB implementation demo (Schema design and Collections)

I need to prepare a technical presentation about MongoDB. My goal is to show why and how to choose MongoDB over a relational DB by using a practical, real-world example.

I need an example that allows me to showcase:

  1. Collection Structure: How to group data effectively
  2. Schema Design Choices
  3. Write Operations: Examples of interesting Inserts and Updates
  4. Flexibility: How the schema handles varying data fields between documents.

Thanks in advance for your help!

reddit.com
u/InternationalOwl8337 — 10 days ago
▲ 11 r/mongodb

What are you building with AI + MongoDB?

Hi everyone! I’m a Product Manager on the Developer Experience team at MongoDB, and I’d love to learn more from this community about how you’re using MongoDB in AI applications.

A few things I’m especially curious about:

  • What are you currently building with AI and MongoDB?
  • What frameworks, libraries, or tools are you using? LangChain, LangGraph, LlamaIndex, Spring AI, Mastra, CrewAI, Vercel AI SDK, something else?
  • Are you building agents, RAG apps, memory systems, workflow automation, eval pipelines, internal copilots, or something totally different?
  • Where has MongoDB worked well for your use case?
  • Where has it been harder than expected?
  • What docs, integrations, examples, or product improvements would make your life easier?

I’m especially interested in hearing about real-world workflows: what you tried, what worked, what didn’t, and where you had to build around gaps.

Also, if you’ve built an open source project or example using MongoDB in an AI workflow, please share it! We’d love to see what the community is creating.

Thanks in advance. I’m here to listen and learn.

reddit.com
u/alexbevi — 14 days ago

MongoDB Atlas connection timeout in Node.js Express despite IP whitelisting and DNS fixes

I am facing a MongoDB Atlas connection timeout issue in my Node.js + Express application.

Environment

- Node.js v24 (also tested with v22)

- Mongoose v9+ (also tested with v8.6)

- MongoDB Atlas

- VPS server (IPv4)

- Express.js backend

Problem

My application is unable to connect to MongoDB Atlas and always throws a timeout/server selection error.

Example error:

MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster

What I already tried

  1. IP Whitelisting

- Added my VPS public IP in MongoDB Atlas Network Access

- Also tried:

0.0.0.0/0

(still same issue)

  1. Different Connection Strings

Tried both:

- "mongodb+srv://"

- Standard connection string from Atlas

Still getting timeout issue.

  1. DNS Changes

Added public DNS servers:

- "8.8.8.8"

- "1.1.1.1"

Also tried:

require('dns').setDefaultResultOrder('ipv4first');

No change.

  1. Version Downgrade

Downgraded:

- Node.js 24 → 22

- Mongoose 9 → 8.6

Issue still persists.

  1. Network Testing

When testing connectivity from the VPS, the MongoDB domain connection also times out.

Question

What else should I check?

Could this be:

- VPS firewall issue?

- ISP/VPS provider blocking MongoDB Atlas ports?

- DNS/SRV resolution problem?

- MongoDB Atlas networking issue?

Has anyone faced a similar issue with MongoDB Atlas on a VPS?

Any debugging steps or fixes would help.

reddit.com
u/dmx2101 — 13 days ago

Today, I created a cluster for free version for my hobby project mongodb migration from different account. And I used compass to connect the db. I was able to connect and moving to express js, but I keep getting bad auth error. I retried tons of times to make sure I am copying and pasting right thing but still no luck. Since I already set ip address in the list and I am able to connect through compass, and it’s error is auth, it should not matter but I still added 0.0.0.0/0
Of course it’s not fixed yet. I created two different users with read and write role and admin role. Both not working.
Can anyone where I screwed up? Also everything was working before I migrated to this new account.

u/rue_1113 — 13 days ago