# CVE-2022-23639: Improper Restriction of Operations within the Bounds of a Memory Buffer and Race Condition in crossbeam-utils

> A race condition in crossbeam-utils on 32-bit targets allows unaligned memory accesses, potentially leading to data corruption or disclosure.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Feb 2022
- **Updated:** 22 Apr 2025
- **Also known as:** AZL-41454, AZL-44763, AZL-61381, DEBIAN-CVE-2022-23639, GHSA-qc84-gqf4-9926, RUSTSEC-2022-0041, UBUNTU-CVE-2022-23639

## What is CVE-2022-23639?

CVE-2022-23639 is a high-severity vulnerability in crossbeam-rs crossbeam, published on 15 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

crossbeam-utils provides atomics, synchronization primitives, scoped threads, and other utilities for concurrent programming in Rust. crossbeam-utils prior to version 0.8.7 incorrectly assumed that the alignment of `{i,u}64` was always the same as `Atomic{I,U}64`. However, the alignment of `{i,u}64` on a 32-bit target can be smaller than `Atomic{I,U}64`. This can cause unaligned memory accesses and data race. Crates using `fetch_*` methods with `AtomicCell<{i,u}64>` are affected by this issue. 32-bit targets without `Atomic{I,U}64` and 64-bit targets are not affected by this issue. This has been fixed in crossbeam-utils 0.8.7. There are currently no known workarounds.

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

## Which versions are affected by CVE-2022-23639?

3 open source packages ship an affected version, including crossbeam-utils. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `crossbeam-utils` | crates.io | All versions | 0.8.7 |
| `crossbeam-utils` | crates.io | All versions | 0.8.7 |
| `crossbeam-utils` | crates.io | From 0.0.0-0 | 0.8.7 |

Products: Crossbeam Project Crossbeam.

## How do I fix CVE-2022-23639?

Upgrade crossbeam-utils to 0.8.7 or later.

## Is CVE-2022-23639 being exploited?

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

## Other vulnerabilities in crossbeam-rs crossbeam

- [CVE-2021-32810](https://insights.sbomify.com/CVE-2021-32810/): Data race in crossbeam-deque (critical 9.8)
- [CVE-2018-20996](https://insights.sbomify.com/CVE-2018-20996/): Double free in crossbeam (critical 9.8)
- [CVE-2020-15254](https://insights.sbomify.com/CVE-2020-15254/): Undefined Behavior in bounded Crossbeam channel (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-23639 and fix it if it is affected.

What it is: CVE-2022-23639 is a high-severity vulnerability in crossbeam-rs crossbeam, published on 15 Feb 2022. 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-2022-23639 exists.

Affected packages and fixed versions:
- crossbeam-utils (crates.io): affected all versions; fixed in 0.8.7
- crossbeam-utils (crates.io): affected all versions; fixed in 0.8.7
- crossbeam-utils (crates.io): affected from 0.0.0-0; fixed in 0.8.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-2022-23639/ (Markdown: https://insights.sbomify.com/CVE-2022-23639/index.md)
```

## Sources

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

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