Safeguard
Vulnerability Analysis•

CVE-2023-0437: Medium Infinite Loop in MongoDB C Driver libbson

CVE-2023-0437 is a medium severity infinite loop in bson_utf8_validate in the MongoDB C Driver before 1.25.0. Upgrade to 1.25.0 or 1.24.5 or later.

Safeguard Security Team
3 min read

CVE-2023-0437 is a medium severity (CVSS 5.3) infinite loop in bson_utf8_validate in the MongoDB C Driver, all versions before 1.25.0. Certain inputs can keep a process spinning, causing denial of service. Upgrade to 1.25.0 or later, or to 1.24.5 on the older line.

What's affected

The MongoDB ticket for this issue, CDRIVER-4747, lists the fix versions as 1.25.0 and 1.24.5. The ticket's description says all MongoDB C Driver versions prior to 1.25.0 are affected. That is a small difference: the CVE text names 1.25.0, while the ticket also shows a 1.24.5 patch on the 1.24 line. If you are on 1.24.x, 1.24.5 or later is the fix.

The ticket title mentions an integer overflow in bson_utf8_validate, and the CVE class is a loop with an unreachable exit. Debian LTS and Fedora announcements are linked from the record, so distribution packages exist. The NVD record was published on 12 January 2024.

How to check if you're exposed

The C driver ships libbson alongside it. Run pkg-config --modversion libbson-1.0 and pkg-config --modversion libmongoc-1.0 to read the installed versions. On Debian or Ubuntu use dpkg -l | grep -E 'libbson|libmongoc', and on Fedora use rpm -q mongo-c-driver-libs.

Many projects bundle libbson as source inside language drivers or applications, so search your repositories and container images as well. Run your Safeguard scan or the free in-browser dependency scan at gold.safeguard.sh/scan against your manifests or SBOM to see whether this package is in your tree, including as a transitive dependency.

What to do now

  1. Find every program and image that links libbson or libmongoc, including vendored copies.
  2. Upgrade to 1.25.0 or later, or 1.24.5 or later if you stay on that line, or install your distribution's update.
  3. Rebuild and redeploy programs that link the library statically.
  4. Add timeouts and worker limits so one stuck request cannot take down a whole service.
  5. Check whether your service validates UTF-8 from outside sources, which is where the loop can be reached.

Why it matters

CWE-835 is a loop with an unreachable exit condition. A validation routine that is meant to check text can instead get stuck on some inputs, so a thread never returns. If untrusted input reaches that routine, an outsider can tie up workers.

The record scores availability impact as low and nothing else, so no data theft or code execution is claimed. Even so, a stuck worker in a server can matter more than the score suggests, because repeated requests can exhaust the pool. KEV is false.

Try it yourself

Click through it at your own pace, or open it full screen.

Quick check

Which versions fix CVE-2023-0437?

MongoDB's ticket lists 1.25.0 and 1.24.5.

Does it allow code execution?

No. The record scores only a low availability impact.

Sources

You can also run the free in-browser dependency scan at gold.safeguard.sh/scan to see which known vulnerabilities your dependencies carry.

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.