# CVE-2026-50185: RustCrypto Cmov/CmovEq on aarch64 can produce wrong results if high-bits of registers are set

> Incorrect constant-time conditional move results on aarch64 when high register bits are set, potentially compromising cryptographic operations.

- **Severity:** Low 2.0 (`CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Jul 2026
- **Updated:** 20 Jul 2026
- **Also known as:** DEBIAN-CVE-2026-50185, GHSA-3rjw-m598-pq24, MINI-34p9-47x3-qf43, MINI-49rx-4h39-xpp8, MINI-gpf4-rjwv-74h6, MINI-h46m-v8xj-9m66, MINI-pcr7-gvwj-jp83, MINI-rcgc-4w9v-2rrr, UBUNTU-CVE-2026-50185

## What is CVE-2026-50185?

CVE-2026-50185 is a low-severity vulnerability in RustCrypto utils, published on 17 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

RustCrypto CMOV provides conditional move CPU intrinsics which are guaranteed on major platforms to execute in constant-time and not be rewritten as branches by the compiler. From 0.1.1 until 0.5.4, the aarch64 implementations of Cmov and CmovEq in cmov/src/backends/aarch64.rs assume high bits are zero-extended when loading values smaller than a register, so set high bits such as [8..] in a Cmov selector or [16..] of self or other in the u16 and i16 CmovEq implementations can cause left.cmovz(&right, condition) to produce incorrect output. This issue is fixed in version 0.5.4.

Weakness: CWE-758 (Reliance on Undefined, Unspecified, or Implementation-Defined Behavior)

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

2 open source packages ship an affected version, including cmov. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cmov` | crates.io | From 0.1.1 | 0.5.4 |
| `cmov` | crates.io | From 0.1.1 | 0.5.4 |

Products: Rustcrypto Cmov.

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

Upgrade cmov to 0.5.4 or later.

## Is CVE-2026-50185 being exploited?

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

## Other vulnerabilities in RustCrypto utils

- [CVE-2026-23519](https://insights.sbomify.com/CVE-2026-23519/): RustCrypto cmov: thumbv6m-none-eabi compiler emits non-constant time assembly when using cmovnz (high 8.9)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-50185 is a low-severity vulnerability in RustCrypto utils, published on 17 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50185 exists.

Affected packages and fixed versions:
- cmov (crates.io): affected from 0.1.1; fixed in 0.5.4
- cmov (crates.io): affected from 0.1.1; fixed in 0.5.4

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-50185/ (Markdown: https://insights.sbomify.com/CVE-2026-50185/index.md)
```

## Sources

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

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