Vulnerabilities in pkg:gem/bson

PACKAGE
Advisory Identifier: GHSA-qh4w-7pw3-p4rp
Advisory Summary

CVE-2015-4411 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Bson libraries in the RubyGems ecosystem. The issue involves bson rubygem contains potential denial of service. Remediation is available by upgrading affected packages to version 3.0.4.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/bson

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/bson. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-qh4w-7pw3-p4rp CVE-2015-4411 HIGH BSON rubygem contains potential denial of service
GHSA-h6rj-8r3c-9gpj CVE-2015-4412 CRITICAL bson is vulnerable to denial of service due to incorrect regex validation

CVE-2015-4411 at a Glance

CVE Identifier CVE-2015-4411
GHSA Identifier GHSA-qh4w-7pw3-p4rp
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Bson
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2015-4411

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.

bson fixed: 3.0.4
Upgrade bson to 3.0.4
Verify Direct and Transitive Dependencies

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-4411, 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 3.0.4), 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

The `Moped::BSON::ObjecId.legal?` method in `mongodb/bson-ruby` before 3.0.4 as used in rubygem-moped allows remote attackers to cause a denial of service (worker resource consumption) via a crafted string. NOTE: This issue is due to an incomplete fix to CVE-2015-4410.

CVE-2015-4411 Affected Bson Versions

1 component(s)
Fixed Versions:
3.0.4
Product / Package Ecosystem Affected Versions Fixed Version
bson
RubyGems
< 3.0.4
3.0.4

References

NVD — CVE-2015-4411 NVD
https://nvd.nist.gov/vuln/detail/CVE-2015-4411
Security Fix Commit FIX COMMIT
https://github.com/mongodb/bson-ruby/commit/976da329ff03ecdfca3030eb6efe3c85e6db9999
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=1229706
Security Fix Commit FIX COMMIT
https://github.com/mongodb/bson-ruby/commit/fef6f75413511d653c76bf924a932374a183a24f#diff-8c8558c185bbb548ccb5a6d6ac4bfee5R191
Security Fix Commit FIX COMMIT
https://github.com/mongoid/moped/commit/dd5a7c14b5d2e466f7875d079af71ad19774609b#diff-3b93602f64c2fe46d38efd9f73ef5358R24
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-qh4w-7pw3-p4rp
Bson Source Repository REPOSITORY
https://github.com/mongodb/bson-ruby
Bson Source Repository REPOSITORY
https://github.com/mongodb/bson-ruby/compare/7446d7c6764dfda8dc4480ce16d5c023e74be5ca...28f34978a85b689a4480b4d343389bf4886522e7
Bson Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bson/CVE-2015-4411.yml
homakov.blogspot.ru/2012/05/saferweb-in... WEB
https://homakov.blogspot.ru/2012/05/saferweb-injects-in-various-ruby.html
sakurity.com/blog/2015/06/04/mon... WEB
https://sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html
seclists.org/oss-sec/2015/q2/653 WEB
https://seclists.org/oss-sec/2015/q2/653
Bson Security Information SECURITY
https://security-tracker.debian.org/tracker/CVE-2015-4411
Bson Security Information SECURITY
https://web.archive.org/web/20200228085849/http://www.securityfocus.com/bid/75045
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161964.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161987.html
Bson Security Information SECURITY
http://www.openwall.com/lists/oss-security/2015/06/06/3

Frequently Asked Questions

What is CVE-2015-4411?
CVE-2015-4411 is a security vulnerability in Bson involving BSON rubygem contains potential denial of service under CWE-400: Uncontrolled Resource Consumption.
Which Bson versions are affected?
Affected versions include releases prior to 3.0.4 across affected packages: bson.
What version fixes CVE-2015-4411?
Upgrading to 3.0.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bson affected?
Yes, bson is affected in releases prior to 3.0.4. Upgrade your dependency to 3.0.4 or later.
What is the CVSS score of CVE-2015-4411?
CVE-2015-4411 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2015-4411?
CVE-2015-4411 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check RubyGems dependencies for CVE-2015-4411?
Run the dependency tree command: 'inspect dependencies for bson'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qh4w-7pw3-p4rp",
  "modified" : "2023-08-25T21:29:46Z",
  "published" : "2020-04-29T15:34:50Z",
  "aliases" : [ "CVE-2015-4411" ],
  "summary" : "BSON rubygem contains potential denial of service",
  "details" : "The `Moped::BSON::ObjecId.legal?` method in `mongodb/bson-ruby` before 3.0.4 as used in rubygem-moped allows remote attackers to cause a denial of service (worker resource consumption) via a crafted string. NOTE: This issue is due to an incomplete fix to CVE-2015-4410.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "bson"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-4411"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mongodb/bson-ruby/commit/976da329ff03ecdfca3030eb6efe3c85e6db9999"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mongodb/bson-ruby/commit/fef6f75413511d653c76bf924a932374a183a24f#diff-8c8558c185bbb548ccb5a6d6ac4bfee5R191"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mongoid/moped/commit/dd5a7c14b5d2e466f7875d079af71ad19774609b#diff-3b93602f64c2fe46d38efd9f73ef5358R24"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1229706"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-qh4w-7pw3-p4rp"
  }, {
    "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-4411.yml"
  }, {
    "type" : "WEB",
    "url" : "https://homakov.blogspot.ru/2012/05/saferweb-injects-in-various-ruby.html"
  }, {
    "type" : "WEB",
    "url" : "https://sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html"
  }, {
    "type" : "WEB",
    "url" : "https://seclists.org/oss-sec/2015/q2/653"
  }, {
    "type" : "WEB",
    "url" : "https://security-tracker.debian.org/tracker/CVE-2015-4411"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200228085849/http://www.securityfocus.com/bid/75045"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161964.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161987.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2015/06/06/3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-04-23T20:14:17Z",
    "nvd_published_at" : null
  }
}