CVE-2015-4412 json
bson is vulnerable to denial of service due to incorrect regex validation
published 8y ago modified 4mo ago also GHSA-h6rj-8r3c-9gpj , EUVD-2018-0180
- cvss
- 9.8
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 4.7%
- EPSS 4.7% chance of exploitation in 30 days, percentile 91%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems bson 1.12.3, 3.0.4
Is CVE-2015-4412 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2015-4412 updated cvss 5.1
rubygem-bson: data injection vulnerability through a crafted ObjectId
-
Red Hat OpenShift Enterprise 2 rubygem-bson, ruby193-rubygem-bson Red Hat Software Collections ror40-rubygem-bson, ruby193-rubygem-bson, rh-ror41-rubygem-bson Red Hat Subscription Asset Manager ruby193-rubygem-bsonaffected: no fix available
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
4.66% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- sakurity.com https://sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | bson | <1.12.3 >=2.0, <3.0.4 |
1.12.3 3.0.4 |
Classification
- Weakness
-
- CWE-400 Uncontrolled Resource Consumption
References
-
github.com
/mongodb/bson-ruby/commit/976da329ff03ecdfca3030eb6efe3c85e6db9999
web, third-party-advisory
-
github.com
/mongodb/bson-ruby/compare/7446d7c6764dfda8dc4480ce16d5c023e74be5ca...28f34978a85b689a4480b4d343389bf4886522e7
web, issue-tracking, patch, third-party-advisory
-
sakurity.com
/blog/2015/06/04/mongo_ruby_regexp.html
web, exploit, patch, third-party-advisory
-
securityfocus.com
/bid/75045
vdb-entry, web, third-party-advisory
-
bugzilla.redhat.com
/show_bug.cgi?id=1229750
web, issue-tracking, third-party-advisory
-
openwall.com
/lists/oss-security/2015/06/06/3
mailing-list, web
-
nvd.nist.gov
/vuln/detail/CVE-2015-4412
advisory
-
github.com
/advisories/GHSA-h6rj-8r3c-9gpj
advisory
-
github.com
/mongodb/bson-ruby
package
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/bson/CVE-2015-4412.yml
web
-
sakurity.com
/blog/2015/06/04/mongo_ruby_regexp.html
web
Sources
- CVE List CVE-2015-4412
- GitHub Advisory GHSA-h6rj-8r3c-9gpj
- NVD CVE-2015-4412
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.