CVE-2015-4412
CRITICAL 9.8CVSS 3.0bson is vulnerable to denial of service due to incorrect regex validation
BSON injection vulnerability in the legal? function in BSON (bson-ruby) gem before 3.0.4 for Ruby allows remote attackers to cause a denial of service (resource consumption) or inject arbitrary data via a crafted string.
- Published
- 5 Feb 2018
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-400
- Also known as
- GHSA-h6rj-8r3c-9gpj
- Sources
- NVDJSONOSV GHSA-h6rj-8r3c-9gpjJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.0 | CRITICAL 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.0 | CRITICAL 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | bson_project | bsoncpe:2.3:a:bson_project:bson:3.0.3:*:*:*:*:ruby:*:* |
= 3.0.3 | |
| OSV | RubyGems | bson | < 1.12.3 | 1.12.3 |
| OSV | RubyGems | bson | >= 2.0, < 3.0.4 | 3.0.4 |
References
- http://www.openwall.com/lists/oss-security/2015/06/06/3 · Mailing List, WEB
- http://www.securityfocus.com/bid/75045 · Third Party Advisory, VDB Entry, WEB
- https://bugzilla.redhat.com/show_bug.cgi?id=1229750 · Issue Tracking, Third Party Advisory, WEB
- https://github.com/mongodb/bson-ruby/commit/976da329ff03ecdfca3030eb6efe3c85e6db9999 · Third Party Advisory, WEB
- https://github.com/mongodb/bson-ruby/compare/7446d7c6764dfda8dc4480ce16d5c023e74be5ca...28f34978a85b689a4480b4d343389bf4886522e7 · Issue Tracking, Patch, Third Party Advisory, WEB
- https://sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html · Exploit, Patch, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2015-4412 · ADVISORY
- https://github.com/advisories/GHSA-h6rj-8r3c-9gpj · ADVISORY
- https://github.com/mongodb/bson-ruby · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bson/CVE-2015-4412.yml · WEB
- http://sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html · WEB
History
- 25 Nov 2026 20:20 UTC · NVD: first stored (published 5 Feb 2018)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 5 Mar 2018)