CVE-2026-54905: CWE-128: Wrap-around Error in ruby-concurrency concurrent-ruby
concurrent-ruby is a modern concurrency tools for Ruby. Prior to 1.3.7, Concurrent::ReentrantReadWriteLock can incorrectly grant a write lock after one thread acquires the read lock 32,768 times. The lock stores a thread's local read and write hold counts in one integer. The low 15 bits are used for the read hold count, and bit 15 is used as WRITE_LOCK_HELD. After 32,768 reentrant read acquisitions, the local read count crosses into the write-lock bit. try_write_lock then treats the thread as already holding a write lock and returns true without setting the global RUNNING_WRITER bit. This breaks the core mutual-exclusion guarantee: the caller is told it has a write lock, but other threads can still hold or acquire read locks at the same time. This vulnerability is fixed in 1.3.7.
AI Analysis
Technical Summary
The vulnerability in concurrent-ruby's Concurrent::ReentrantReadWriteLock arises from storing thread-local read and write hold counts in a single integer where the low 15 bits represent the read hold count and bit 15 indicates a write lock. When a thread acquires the read lock 32,768 times, the read count overflows into the write-lock bit, causing try_write_lock to incorrectly report that the thread holds a write lock without setting the global writer bit. This breaks the mutual exclusion property by allowing other threads to hold or acquire read locks concurrently, violating lock semantics. The flaw is resolved in version 1.3.7.
Potential Impact
The core mutual-exclusion guarantee of the lock is broken, potentially allowing multiple threads to hold read and write locks simultaneously. This can lead to race conditions and inconsistent state in applications relying on this lock for concurrency control. However, the CVSS score is low (2.0), indicating limited impact or exploitability, and no known exploits are reported.
Mitigation Recommendations
Upgrade concurrent-ruby to version 1.3.7 or later, where this vulnerability is fixed. No other official remediation or temporary fix is indicated. Patch status is confirmed by the version fix information.
CVE-2026-54905: CWE-128: Wrap-around Error in ruby-concurrency concurrent-ruby
Description
concurrent-ruby is a modern concurrency tools for Ruby. Prior to 1.3.7, Concurrent::ReentrantReadWriteLock can incorrectly grant a write lock after one thread acquires the read lock 32,768 times. The lock stores a thread's local read and write hold counts in one integer. The low 15 bits are used for the read hold count, and bit 15 is used as WRITE_LOCK_HELD. After 32,768 reentrant read acquisitions, the local read count crosses into the write-lock bit. try_write_lock then treats the thread as already holding a write lock and returns true without setting the global RUNNING_WRITER bit. This breaks the core mutual-exclusion guarantee: the caller is told it has a write lock, but other threads can still hold or acquire read locks at the same time. This vulnerability is fixed in 1.3.7.
CVSS v4.0
Score 2.0low
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in concurrent-ruby's Concurrent::ReentrantReadWriteLock arises from storing thread-local read and write hold counts in a single integer where the low 15 bits represent the read hold count and bit 15 indicates a write lock. When a thread acquires the read lock 32,768 times, the read count overflows into the write-lock bit, causing try_write_lock to incorrectly report that the thread holds a write lock without setting the global writer bit. This breaks the mutual exclusion property by allowing other threads to hold or acquire read locks concurrently, violating lock semantics. The flaw is resolved in version 1.3.7.
Potential Impact
The core mutual-exclusion guarantee of the lock is broken, potentially allowing multiple threads to hold read and write locks simultaneously. This can lead to race conditions and inconsistent state in applications relying on this lock for concurrency control. However, the CVSS score is low (2.0), indicating limited impact or exploitability, and no known exploits are reported.
Mitigation Recommendations
Upgrade concurrent-ruby to version 1.3.7 or later, where this vulnerability is fixed. No other official remediation or temporary fix is indicated. Patch status is confirmed by the version fix information.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-16T13:49:33.556Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3c04afeed863c81e18d769
Added to database: 06/24/2026, 16:24:15 UTC
Last enriched: 06/24/2026, 16:39:21 UTC
Last updated: 08/08/2026, 12:41:11 UTC
Views: 65
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.