CVE-2024-22047:
Race Condition leading to logging errors
3.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.76876%
CWE
-
Published
5/1/2023
Updated
1/8/2024
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
audited | rubygems | >= 4.0.0, < 5.3.3 | 5.3.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from using thread-local storage (Thread.current) for audit context in the store method. The commit diff shows this was replaced with RequestStore (designed for per-request thread isolation). The original implementation's direct use of Thread.current.thread_variable_get/Set without proper synchronization created race conditions in multi-threaded environments, as confirmed by the advisory's description of audits being attributed to wrong users. The test case removal involving Fibers further demonstrates concurrency-related flaws in the original implementation.