# CVE-2026-54904: concurrent-ruby: `AtomicReference#update` livelocks when the stored value is `Float::NAN`

> Attackers can cause CPU exhaustion or service hangs in Ruby applications using concurrent-ruby by triggering a livelock in AtomicReference updates with NaN values.

- **Severity:** High 8.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Jun 2026
- **Updated:** 5 Aug 2026
- **Also known as:** CLEANSTART-2026-UD48034, CLEANSTART-2026-YZ65956, DEBIAN-CVE-2026-54904, GHSA-h8w8-99g7-qmvj, MINI-2cf6-2h4p-gqcj, MINI-2rf9-4vf9-2xm5, MINI-2w6j-22vh-hj7j, MINI-2wpw-pv7f-p586, MINI-459v-r6vf-vv3x, MINI-477w-rhg4-pg43, MINI-59wf-45gf-vjp8, MINI-65wc-3vfv-2f78, MINI-6736-46px-vqpm, MINI-8563-c827-p4q8, MINI-865w-rpqx-rc97, MINI-97wp-6p6m-6h3v, MINI-cmpm-m559-jm96, MINI-f57x-wc6r-747g, MINI-fjhq-7pq5-4528, MINI-h2q6-6xvx-fjxf, MINI-h922-37j9-9x5f, MINI-h98f-cm5r-98gg, MINI-m8hr-fp8x-9f4f, MINI-p73r-fccj-w5cx, MINI-pfjx-3vf5-w63c, MINI-r25m-jjr9-7f5m, MINI-r4c5-pc56-c3g6, MINI-wpf3-3352-rrc9, UBUNTU-CVE-2026-54904

## What is CVE-2026-54904?

CVE-2026-54904 is a high-severity denial of service vulnerability in ruby-concurrency concurrent-ruby, published on 24 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

concurrent-ruby is a modern concurrency tools for Ruby. Prior to 1.3.7, Concurrent::AtomicReference#update can enter a permanent busy retry loop when the current value is Float::NAN. The issue is caused by the interaction between AtomicReference#update, which retries until compare_and_set(old_value, new_value) succeeds; Numeric compare_and_set, which checks old == old_value before attempting the underlying atomic swap.; and Ruby NaN semantics, where Float::NAN == Float::NAN is always false. As a result, once an AtomicReference contains Float::NAN, calling #update repeatedly evaluates the caller's block and never returns. In services that store externally derived numeric values in an AtomicReference, this can cause CPU exhaustion or permanent request/job hangs. This vulnerability is fixed in 1.3.7.

Weakness: CWE-835 (Loop with Unreachable Exit Condition)

## Which versions are affected by CVE-2026-54904?

2 open source packages ship an affected version, including concurrent-ruby. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `concurrent-ruby` | RubyGems | All versions | 1.3.7 |
| `concurrent-ruby` | RubyGems | All versions | 1.3.7 |

Products: Rubyconcurrency Concurrent Ruby.

## How do I fix CVE-2026-54904?

Upgrade concurrent-ruby to 1.3.7 or later.

## Is CVE-2026-54904 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54904 exists.

## Other vulnerabilities in ruby-concurrency concurrent-ruby

- [CVE-2026-54906](https://insights.sbomify.com/CVE-2026-54906/): concurrent-ruby: ReadWriteLock allows wrong-thread write release and stray read-release counter corruption (low 2.1)
- [CVE-2026-54905](https://insights.sbomify.com/CVE-2026-54905/): concurrent-ruby: `ReentrantReadWriteLock` read-count overflow grants a write lock without exclusivity (low 2.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54904 and fix it if it is affected.

What it is: CVE-2026-54904 is a high-severity denial of service vulnerability in ruby-concurrency concurrent-ruby, published on 24 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54904 exists.

Affected packages and fixed versions:
- concurrent-ruby (RubyGems): affected all versions; fixed in 1.3.7
- concurrent-ruby (RubyGems): affected all versions; fixed in 1.3.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54904/ (Markdown: https://insights.sbomify.com/CVE-2026-54904/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54904
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54904
- OSV: https://osv.dev/vulnerability/CVE-2026-54904

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54904/
Summaries are generated and may contain mistakes; the official description above is the record.
