Vulnerabilities in pkg:gem/active_attr

PACKAGE
Advisory Identifier: GHSA-4whf-rmx5-8frv
Advisory Summary

CVE-2021-4250 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-404: Improper Resource Shutdown or Release) affecting Active attr libraries in the RubyGems ecosystem. The issue involves active_attr improper resource shutdown or release vulnerability. Remediation is available by upgrading affected packages to version 0.15.4.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/active_attr

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-4whf-rmx5-8frv CVE-2021-4250 HIGH active_attr Improper Resource Shutdown or Release vulnerability

CVE-2021-4250 at a Glance

CVE Identifier CVE-2021-4250
GHSA Identifier GHSA-4whf-rmx5-8frv
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-404: Improper Resource Shutdown or Release
Affected Product Active attr
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-2021-4250

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

active_attr fixed: 0.15.4
Upgrade active_attr to 0.15.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 active_attr

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-4250, inspect your project dependencies for Active attr:

inspect dependencies for active_attr

Analyze the terminal output to locate any version of Active attr in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.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-404: Improper Resource Shutdown or Release, where the product does not release or incorrectly releases a resource before it is made available for re-use. In Active attr, 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

A vulnerability classified as problematic has been found in cgriego active_attr up to 0.15.3. This affects the function call of the file lib/active_attr/typecasting/boolean_typecaster.rb of the component Regex Handler. The manipulation of the argument value leads to denial of service. The exploit has been disclosed to the public and may be used. Upgrading to version 0.15.4 can address this issue. The name of the patch is dab95e5843b01525444b82bd7b336ef1d79377df. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-216207.

CVE-2021-4250 Affected Active attr Versions

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

References

Frequently Asked Questions

What is CVE-2021-4250?
CVE-2021-4250 is a security vulnerability in Active attr involving active_attr Improper Resource Shutdown or Release vulnerability under CWE-404: Improper Resource Shutdown or Release.
Which Active attr versions are affected?
Affected versions include releases prior to 0.15.4 across affected packages: active_attr.
What version fixes CVE-2021-4250?
Upgrading to 0.15.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is active_attr affected?
Yes, active_attr is affected in releases prior to 0.15.4. Upgrade your dependency to 0.15.4 or later.
What is the CVSS score of CVE-2021-4250?
CVE-2021-4250 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-2021-4250?
CVE-2021-4250 is classified under CWE-404: Improper Resource Shutdown or Release (The product does not release or incorrectly releases a resource before it is made available for re-use.).
How can I check RubyGems dependencies for CVE-2021-4250?
Run the dependency tree command: 'inspect dependencies for active_attr'. 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-4whf-rmx5-8frv",
  "modified" : "2023-01-03T21:25:15Z",
  "published" : "2022-12-19T00:30:23Z",
  "aliases" : [ "CVE-2021-4250" ],
  "summary" : "active_attr Improper Resource Shutdown or Release vulnerability",
  "details" : "A vulnerability classified as problematic has been found in cgriego active_attr up to 0.15.3. This affects the function call of the file lib/active_attr/typecasting/boolean_typecaster.rb of the component Regex Handler. The manipulation of the argument value leads to denial of service. The exploit has been disclosed to the public and may be used. Upgrading to version 0.15.4 can address this issue. The name of the patch is dab95e5843b01525444b82bd7b336ef1d79377df. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-216207.",
  "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" : "active_attr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.15.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4250"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cgriego/active_attr/issues/184"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cgriego/active_attr/pull/185"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cgriego/active_attr/commit/dab95e5843b01525444b82bd7b336ef1d79377df"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cgriego/active_attr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cgriego/active_attr/releases/tag/v0.15.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cgriego/active_attr/releases/tag/v0.15.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/active_attr/CVE-2021-4250.yml"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.216207"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-404" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-19T18:16:23Z",
    "nvd_published_at" : "2022-12-18T22:15:00Z"
  }
}