Description
The MongoDB bson JavaScript module (also known as js-bson) versions 0.5.0 to 1.0.x before 1.0.5 is vulnerable to a Regular Expression Denial of Service (ReDoS) in lib/bson/decimal128.js. The flaw is triggered when the Decimal128.fromString() function is called to parse a long untrusted string.
Recommendation
Update the bson package to the latest compatible version. Followings are version details:
- Affected version(s): >= 0.5.0, < 1.0.5
- Patched version(s): 1.0.5
References
Could your website be exposed too?
SmartScanner can check your website for js-bson vulnerable to REDoS and gives you actionable findings to investigate.
Start a free scanRelated Issues
- Regular Expression Denial of Service (ReDoS) in braces - CVE-2018-1109
- bracket-template vulnerable to reflected XSS - CVE-2018-3735
- LiquidJS Vulnerable to ReDoS via Quadratic Backtracking in `strip_html` Filter Regex - CVE-2026-45617
- rgb2hex vulnerable to inefficient regular expression complexity - CVE-2018-25061


