CVE-2015-4412: Bson Denial of Service Vulnerability
CRITICALCVE-2015-4412 is a CRITICAL (CVSS 9.8) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Bson libraries in the RubyGems ecosystem. The issue involves bson is vulnerable to denial of service due to incorrect regex validation. Remediation is available by upgrading affected packages to version 1.12.3, 3.0.4.
CVE-2015-4412 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2015-4412
To remediate this vulnerability, upgrade all affected Bson dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade bson to 1.12.3
Upgrade bson to 3.0.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for bson
How to Check if You Are Affected
To determine whether your application is affected by CVE-2015-4412, inspect your project dependencies for Bson:
inspect dependencies for bson
Analyze the terminal output to locate any version of Bson in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Bson, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2015-4412 Affected Bson Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2015-4412?
Which Bson versions are affected?
What version fixes CVE-2015-4412?
Is bson affected?
What is the CVSS score of CVE-2015-4412?
What CWE is associated with CVE-2015-4412?
How can I check RubyGems dependencies for CVE-2015-4412?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h6rj-8r3c-9gpj",
"modified" : "2022-04-25T22:38:49Z",
"published" : "2018-03-05T19:43:21Z",
"aliases" : [ "CVE-2015-4412" ],
"summary" : "bson is vulnerable to denial of service due to incorrect regex validation",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "bson"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.12.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "bson"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0"
}, {
"fixed" : "3.0.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-4412"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/bson-ruby/commit/976da329ff03ecdfca3030eb6efe3c85e6db9999"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1229750"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-h6rj-8r3c-9gpj"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mongodb/bson-ruby"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/bson-ruby/compare/7446d7c6764dfda8dc4480ce16d5c023e74be5ca...28f34978a85b689a4480b4d343389bf4886522e7"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bson/CVE-2015-4412.yml"
}, {
"type" : "WEB",
"url" : "https://sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html"
}, {
"type" : "WEB",
"url" : "http://sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2015/06/06/3"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/75045"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:39:12Z",
"nvd_published_at" : null
}
}