CVE-2015-4412
bson 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2015-4412- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-400
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2015-4412- Updated
- 2026-11-02
EUVDEUVD-2018-0180 No score
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.
- Record
EUVD-2018-0180- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-h6rj-8r3c-9gpj
9.8
bson 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.
- Record
GHSA-h6rj-8r3c-9gpj- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-400
- Updated
- 2026-11-02
OSVGHSA-h6rj-8r3c-9gpj
9.8
bson 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.
- Record
GHSA-h6rj-8r3c-9gpj- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-400
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
bsonRubyGems |
2.0 up to 3.0.4 | 3.0.4 |
bsonRubyGems |
before 1.12.3 | 1.12.3 |
bsonRubyGems |
before 1.12.3, plus listed versions 0.200.20.11.01.0.11.0.2 Show 45 moreShow less1.0.31.0.41.0.51.0.61.0.71.0.91.11.1.11.1.21.1.31.1.41.1.51.10.01.10.0.rc01.10.0.rc11.10.11.10.21.11.11.12.01.12.0.rc01.12.0.rc11.12.0.rc21.12.11.12.21.2.01.2.11.2.21.2.31.2.41.2.rc01.2.rc11.2.rc21.3.01.3.0.rc01.3.11.4.01.4.11.5.01.5.0.rc01.5.11.5.21.6.01.6.11.6.21.6.4 |
1.12.3 |
bsonRubyGems |
2.0 up to 3.0.4, plus listed versions 2.0.02.1.02.1.12.1.22.2.0 Show 9 moreShow less2.2.12.2.22.2.32.2.42.3.03.0.03.0.13.0.23.0.3 |
3.0.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2015-4412 is a critical vulnerability (CVSS 9.8) in Bson Project Bson, published February 5, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.66%, the 91st percentile. Fixed in bson 3.0.4.
References
securityfocus.com/bid/75045
github.com/mongodb/bson-ruby/commit/976da329ff03ecdfca3030eb6efe3c85e6db9999
github.com/mongodb/bson-ruby/compare/7446d7c6764dfda8dc4480ce16d5c023e74be5ca...28f34978a85b689a4480b4d343389bf4886522e7
sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html
bugzilla.redhat.com/show_bug.cgi?id=1229750
openwall.com/lists/oss-security/2015/06/06/3
Left out here: 19 versions. The JSON record has them.