/

CVE-2026-23519

Severity:

CRITICAL RISK

(9.8)

Timing Side-Channel / Side-Channel Vulnerability

CVE-2026-23519

Analyzed

Vulnerability type

Category:

Timing Side-Channel / Side-Channel Vulnerability

CWE:

CWE-208, CWE-203

Impact:

Timing side-channel leakage of sensitive information

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

RustCrypto's CMOV crate, intended to provide constant-time conditional move operations, can emit non-constant-time assembly on thumbv6m-none-eabi targets (e.g., Cortex-M0, M0+, M1) when using the portable cmovnz variant in affected versions.

Under these conditions, operations that should be data-oblivious can instead vary in execution time based on secret-dependent branches, enabling timing side-channel attacks in cryptographic or other sensitive code paths.

Affected context

This issue affects Rust code that:

  • Uses the RustCrypto CMOV crate prior to version 0.4.4
  • Targets the thumbv6m-none-eabi architecture (e.g., ARM Cortex-M0, M0+, M1)
  • Relies on the portable cmovnz conditional move to provide constant-time behavior for security-sensitive operations

In such environments, the compiler emits non-constant-time assembly, so code that assumes constant-time execution for protecting secrets (e.g., cryptographic keys, comparisons, or branching on secret data) may inadvertently become timing-dependent.

Exploit preconditions

  • Attack surface: Side-channel observation of a system running affected binaries (e.g., measuring execution time, power, or other timing-correlated signals).
  • Required access: Ability to repeatedly trigger operations that use CMOV-based constant-time constructs, and to observe timing responses with sufficient resolution.
  • Trigger point: Calls to code paths relying on cmovnz (portable version) for constant-time behavior on thumbv6m-none-eabi targets.
  • Why exploitation is possible: The compiler emits secret-dependent control flow or instruction sequences whose execution time varies with the underlying data, breaking the constant-time guarantee and enabling an attacker to correlate observed timing differences with sensitive values.

Why this happens

The root cause is a mismatch between the intended constant-time semantics of the CMOV intrinsics and the actual machine code generated by the compiler for the thumbv6m-none-eabi target.

Although the CMOV crate aims to implement data-independent conditional moves, the portable cmovnz implementation is compiled into non-constant-time assembly on Cortex-M0/M0+/M1, effectively reintroducing conditional branches or variable-latency behavior based on the condition.

This corresponds to:

  • CWE-208: Observable Timing Discrepancy, because the execution time varies based on underlying data that should remain confidential.
  • CWE-203: Observable Discrepancy, in the broader sense that an attacker can infer information from differences in behavior (here, timing) of operations presumed to be uniform.

At an abstract level, the pattern is "relying on compiler behavior for constant-time guarantees without verifying emitted code," which can lead to side-channel exposure when compiler optimizations or target architectures do not preserve constant-time properties.

Potential impact

  • An attacker may infer bits of cryptographic keys or other secrets through fine-grained timing measurements of affected operations.
  • Side-channel leakage could facilitate key recovery attacks against cryptographic protocols implemented using the CMOV crate on vulnerable microcontrollers.
  • Sensitive comparisons (e.g., MAC verification, password checks, nonce or tag validation) can become distinguishable based on partial matches, enabling more efficient guessing or oracle-style attacks.
  • In multi-tenant or physically accessible environments, an attacker could refine timing measurements over many queries to reconstruct secret-dependent control flow.

General mitigation guidance

Mitigation generally involves reinforcing constant-time guarantees and avoiding unchecked reliance on compiler behavior:

  • Prefer implementations that use architecture-specific intrinsics or assembly proven to compile into branchless, constant-time sequences on the targeted MCU.
  • Treat constant-time behavior as a contract that must be validated per architecture; incorporate code generation checks for security-critical primitives.
  • Isolate cryptographic and other sensitive operations behind well-vetted libraries that explicitly support the target architecture and document constant-time properties.
  • Minimize the amount of code that depends on secret data for control flow; design APIs that avoid exposing subtle timing differences in error handling or equality checks.
  • Use least-privilege principles and compartmentalization so that even if timing leakage occurs, the reachable secret material and impact are constrained.

How teams detect issues like this

Detection focuses on identifying non-constant-time behavior and risky assumptions about compiler output:

  • Static analysis / code review:
  • Flag custom "constant-time" constructs that rely on generic C/Rust control flow instead of architecture-verified intrinsics or assembly.
  • Look for uses of CMOV intrinsics or similar primitives on architectures where constant-time guarantees are unverified or known to be problematic.
  • Examine cryptographic or secret-handling code for secret-dependent branching, early exits, or loops whose iteration count depends on sensitive data.
  • Build and tooling checks:
  • Integrate tooling that inspects emitted assembly (e.g., per-commit or CI jobs) to ensure that critical primitives compile to branchless, constant-time patterns on supported targets.
  • Use side-channel analysis frameworks or micro-benchmarks to measure timing variance of targeted operations under varying secret inputs.
  • Policy and process:
  • Establish a review policy that treats "constant-time" claims as security properties requiring explicit verification and documentation.
  • Leverage automated review tools or linters that highlight patterns known to undermine constant-time guarantees.

Sources

SourceLink
github.comgithub.com/RustCrypto/utils/commit/55977257e7c82a309d5e8abfdd380a774f0f9778
github.comgithub.com/RustCrypto/utils/security/advisories/GHSA-2gqc-6j2q-83qp

Frequently asked

questions

Exploitability depends on the attacker's ability to repeatedly exercise affected operations and measure their execution time with sufficient precision. On embedded systems like Cortex-M0/M0+/M1, this may be feasible when the attacker has physical access, shared hardware, or a tightly coupled external interface.

Not necessarily. The attacker primarily needs a way to trigger the vulnerable code paths and observe timing differences. This could be over a protocol implemented on the MCU, a side-channel measurement setup, or a local interface, rather than full code execution or privileged access.

The safest pattern is to use constant-time primitives that are explicitly validated for the target architecture—typically through dedicated intrinsics or assembly—and to verify that the compiled output remains branchless and data-independent for all supported toolchains and optimization levels.

Prevention involves treating constant-time behavior as a testable property: incorporate assembly inspection or side-channel testing into CI, rely on well-audited cryptographic libraries, avoid rolling bespoke constant-time constructs without verification, and ensure that security reviews consider compiler and architecture behavior, not just high-level source code.

Find out what's already
exploitable in your codebase.