Vulnerabilities in pkg:gem/bindata

PACKAGE
Advisory Identifier: GHSA-hj56-84jw-67h6
Advisory Summary

CVE-2021-32823 is a MODERATE (CVSS 3.7) potential denial-of-service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Bindata libraries in the RubyGems ecosystem. The issue involves potential denial-of-service in bindata. Remediation is available by upgrading affected packages to version 2.4.10.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/bindata

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-hj56-84jw-67h6 CVE-2021-32823 MODERATE Potential Denial-of-Service in bindata

CVE-2021-32823 at a Glance

CVE Identifier CVE-2021-32823
GHSA Identifier GHSA-hj56-84jw-67h6
Severity MODERATE
CVSS v3.1 Base Score 3.7
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Bindata
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 3.7

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

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

How to Fix CVE-2021-32823

To remediate this vulnerability, upgrade all affected Bindata dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

bindata fixed: 2.4.10
Upgrade bindata to 2.4.10
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 bindata

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-32823, inspect your project dependencies for Bindata:

inspect dependencies for bindata

Analyze the terminal output to locate any version of Bindata in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.10), 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 Bindata, 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

In the bindata RubyGem before version 2.4.10 there is a potential denial-of-service vulnerability. In affected versions it is very slow for certain classes in BinData to be created. For example `BinData::Bit100000`, `BinData::Bit100001`, `BinData::Bit100002`, `BinData::Bit<N>`. In combination with `<user_input>.constantize` there is a potential for a CPU-based DoS. In version 2.4.10, bindata improved the creation time of Bits and Integers.

CVE-2021-32823 Affected Bindata Versions

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

References

Frequently Asked Questions

What is CVE-2021-32823?
CVE-2021-32823 is a security vulnerability in Bindata involving Potential Denial-of-Service in bindata under CWE-400: Uncontrolled Resource Consumption.
Which Bindata versions are affected?
Affected versions include releases prior to 2.4.10 across affected packages: bindata.
What version fixes CVE-2021-32823?
Upgrading to 2.4.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bindata affected?
Yes, bindata is affected in releases prior to 2.4.10. Upgrade your dependency to 2.4.10 or later.
What is the CVSS score of CVE-2021-32823?
CVE-2021-32823 has a CVSS v3.1 base score of 3.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2021-32823?
CVE-2021-32823 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-2021-32823?
Run the dependency tree command: 'inspect dependencies for bindata'. 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-hj56-84jw-67h6",
  "modified" : "2024-11-18T16:26:14Z",
  "published" : "2021-06-23T23:42:04Z",
  "aliases" : [ "CVE-2021-32823" ],
  "summary" : "Potential Denial-of-Service in bindata",
  "details" : "In the bindata RubyGem before version 2.4.10 there is a potential denial-of-service vulnerability. In affected versions it is very slow for certain classes in BinData to be created. For example `BinData::Bit100000`, `BinData::Bit100001`, `BinData::Bit100002`, `BinData::Bit<N>`. In combination with `<user_input>.constantize` there is a potential for a CPU-based DoS. In version 2.4.10, bindata improved the creation time of Bits and Integers.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "bindata"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32823"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/issues/476"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dmendel/bindata/commit/d99f050b88337559be2cb35906c1f8da49531323"
  }, {
    "type" : "WEB",
    "url" : "https://about.gitlab.com/releases/2021/06/01/security-release-gitlab-13-12-2-released/#update-bindata-dependency"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dmendel/bindata"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dmendel/bindata/blob/master/ChangeLog.rdoc#version-2410-2021-05-18-"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dmendel/bindata/blob/v2.4.10/ChangeLog.rdoc#version-2410-2021-05-18-"
  }, {
    "type" : "WEB",
    "url" : "https://rubygems.org/gems/bindata"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-06-23T23:41:30Z",
    "nvd_published_at" : "2021-06-24T00:15:00Z"
  }
}