CVE-2024-22047: Audited Race Condition Leading To Logging Vulnerability

LOW
Advisory Identifier: GHSA-hjp3-5g2q-7jww
CVSS 3.1
Published
Advisory Summary

CVE-2024-22047 is a LOW (CVSS 3.1) race condition leading to logging vulnerability (General Security Weakness) affecting Audited libraries in the RubyGems ecosystem. The issue involves race condition leading to logging errors. Remediation is available by upgrading affected packages to version 5.3.3.

CVE-2024-22047 at a Glance

CVE Identifier CVE-2024-22047
GHSA Identifier GHSA-hjp3-5g2q-7jww
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification General Security Weakness
Affected Product Audited
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 3.1

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

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

How to Fix CVE-2024-22047

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

audited fixed: 5.3.3
Upgrade audited to 5.3.3
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 audited

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-22047, inspect your project dependencies for Audited:

inspect dependencies for audited

Analyze the terminal output to locate any version of Audited in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.3.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 General Security Weakness. In Audited, 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 certain setups with threaded web servers, Audited's use of `Thread.current` can incorrectly attributed audits to the wrong user. Fixed in 5.3.3. In March, @convisoappsec noticed that the library in question had a Race Condition problem, which caused logs to be registered at times with different users than those who performed the genuine actions. - The first issue we identified was from November 2021: https://github.com/collectiveidea/audited/issues/601 - So the solution was implemented in the following Pull Request: https://github.com/collectiveidea/audited/pull/669 - And the feature was published in version 5.3.3: RELEASE: https://github.com/collectiveidea/audited/pull/671

CVE-2024-22047 Affected Audited Versions

1 component(s)
Fixed Versions:
5.3.3
Product / Package Ecosystem Affected Versions Fixed Version
audited
RubyGems
≥ 4.0.0
< 5.3.3
5.3.3

References

Frequently Asked Questions

What is CVE-2024-22047?
CVE-2024-22047 is a security vulnerability in Audited involving Race Condition leading to logging errors under General Security Weakness.
Which Audited versions are affected?
Affected versions include releases prior to 5.3.3 across affected packages: audited.
What version fixes CVE-2024-22047?
Upgrading to 5.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is audited affected?
Yes, audited is affected in releases prior to 5.3.3. Upgrade your dependency to 5.3.3 or later.
What is the CVSS score of CVE-2024-22047?
CVE-2024-22047 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2024-22047?
CVE-2024-22047 is classified under General Security Weakness.
How can I check RubyGems dependencies for CVE-2024-22047?
Run the dependency tree command: 'inspect dependencies for audited'. 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-hjp3-5g2q-7jww",
  "modified" : "2024-01-05T15:27:28Z",
  "published" : "2023-05-01T14:00:47Z",
  "aliases" : [ "CVE-2024-22047" ],
  "summary" : "Race Condition leading to logging errors",
  "details" : "In certain setups with threaded web servers, Audited's use of `Thread.current` can incorrectly attributed audits to the wrong user. \n\nFixed in 5.3.3. \n\nIn March, @convisoappsec noticed that the library in question had a Race Condition problem, which caused logs to be registered at times with different users than those who performed the genuine actions.\n\n- The first issue we identified was from November 2021: https://github.com/collectiveidea/audited/issues/601 \n- So the solution was implemented in the following Pull Request: https://github.com/collectiveidea/audited/pull/669 \n- And the feature was published in version 5.3.3: RELEASE: https://github.com/collectiveidea/audited/pull/671\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "audited"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "5.3.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/collectiveidea/audited/security/advisories/GHSA-hjp3-5g2q-7jww"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22047"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/collectiveidea/audited/issues/601"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/collectiveidea/audited/pull/669"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/collectiveidea/audited/pull/671"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/collectiveidea/audited/commit/342734c9396d8f96d3165f1d8531c626139fa4c6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/collectiveidea/audited"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/audited/CVE-2024-22047.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-01T14:00:47Z",
    "nvd_published_at" : null
  }
}