Description
In MongoDB libbson 1.7.0, the bson_iter_codewscope function in bson-iter.c miscalculates a bson_utf8_validate length argument, which allows remote attackers to cause a denial of service (heap-based buffer over-read in the bson_utf8_validate function in bson-utf8.c), as demonstrated by bson-to-json.c.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | libbson-xs-perl | 0.8.4-2+deb12u1 | — |
| Debian 11 | libbson-xs-perl | 0.8.4-1+deb11u1 | DLA-4160-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | libbson | 1.9.2-1ubuntu0.1~esm2 | USN-4812-1 |
| Ubuntu Pro 16.04 LTS | libbson | 1.3.1-1ubuntu0.1~esm1 | USN-4812-1 |
Advisories 3
- USN-4812-1 libbson vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DLA-4160-1 libbson-xs-perl - security update Debian Security (DSA / DLA) · Mar 9, 2026
- WID-SEC-2025-0992 MongoDB: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · May 11, 2025