{"id":"RUSTSEC-2026-0620","aliases":["RUSTSEC-2026-0620"],"related":[],"kind":"vulnerability","state":"published","title":"Scalar Multiplication Arithmetic Bug in AVX-512 Backend","summary":"## Summary\n\nAny user using the AVX-512 backend of `curve25519-dalek` could have produced incorrect outputs on computations involving a scalar multiplication on an attacker-chosen Edwards or Ristretto point. This affects all versions of `curve25519-dalek` in the range `1.1.0–5.0.0`, inclusive. No other backends are affected: `serial`, `fiat`, and `simd` (AVX2) are all fine.\n\n## Who Is Affected\n\nAnyone who used `curve25519-dalek` with the AVX-512 backend. Here is how that would happen, based on crate version:\n\n|Version|How AVX-512 backend is enabled|\n|-------|----------------------|\n|`5.0.0` | The crate must be compiled with `--cfg curve25519_dalek_backend=\"avx512\"` or built with `target_feature=+avx512ifma,+avx512vl` (or `-C target-cpu=native` on an AVX-512 target) on `rustc` ≥ 1.89 or nightly. In addition, the CPU it's being run on must have those features (runtime selection) |\n|`4.2.0–5.0.0-rc.1` | The crate must be compiled with `--cfg curve25519_dalek_backend=\"unstable_avx512\"` on nightly. |\n|`4.0.0–4.1.3` | The crate must be compiled with nightly and the CPU it's being run on must have `avx512ifma` and `avx512vl` (i.e., runtime backend selection). |\n|`1.1.0–3.2.1` | The nightly-only `simd_backend` feature must be set and the build must have `target_feature=+avx512ifma` |\n\n## Impact\n\nOn the AVX-512 backend, Edwards or Ristretto computations including scalar multiplication with an attacker-chosen point could be made to be incorrect. No other backends are affected. x-only multiplication used in `x25519-dalek` is unaffected. `ed25519-dalek` _may_ be affected, though, in the worst case, a valid signature under an attacker-chosen public key would appear as invalid.\n\n## Workaround\n\nThe workaround depends on the version you're using:\n\n|Version|Workaround|\n|-------|----------|\n|`5.0.0` | Do not compile with `--cfg curve25519_dalek_backend=\"avx512\"` and do not build with `target_feature=+avx512ifma,+avx512vl` or `-C target-cpu=native` on an AVX-512 target. You can set `--cfg curve25519_dalek_backend=\"simd\"` instead. |\n|`4.2.0–5.0.0-rc.1` | Do not set `--cfg curve25519_dalek_backend=\"unstable_avx512\"`. Or compile on stable. |\n|`4.0.0–4.1.3` | Override the backend to `--cfg curve25519_dalek_backend=\"serial\"`, or compile on stable. |\n|`1.1.0–3.2.1` | Do not set the `simd_backend` feature. Or do not set `target_feature=+avx512ifma` or `-C target-cpu=native` on an AVX-512 target in the build. |\n\n## More Details\n\nA more complete writeup can be found at https://github.com/dalek-cryptography/curve25519-dalek/issues/934","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"## Summary\n\nAny user using the AVX-512 backend of `curve25519-dalek` could have produced incorrect outputs on computations involving a scalar multiplication on an attacker-chosen Edwards or Ristretto point. This affects all versions of `curve25519-dalek` in the range `1.1.0–5.0.0`, inclusive. No other backends are affected: `serial`, `fiat`, and `simd` (AVX2) are all fine.\n\n## Who Is Affected\n\nAnyone who used `curve25519-dalek` with the AVX-512 backend. Here is how that would happen, based on crate version:\n\n|Version|How AVX-512 backend is enabled|\n|-------|----------------------|\n|`5.0.0` | The crate must be compiled with `--cfg curve25519_dalek_backend=\"avx512\"` or built with `target_feature=+avx512ifma,+avx512vl` (or `-C target-cpu=native` on an AVX-512 target) on `rustc` ≥ 1.89 or nightly. In addition, the CPU it's being run on must have those features (runtime selection) |\n|`4.2.0–5.0.0-rc.1` | The crate must be compiled with `--cfg curve25519_dalek_backend=\"unstable_avx512\"` on nightly. |\n|`4.0.0–4.1.3` | The crate must be compiled with nightly and the CPU it's being run on must have `avx512ifma` and `avx512vl` (i.e., runtime backend selection). |\n|`1.1.0–3.2.1` | The nightly-only `simd_backend` feature must be set and the build must have `target_feature=+avx512ifma` |\n\n## Impact\n\nOn the AVX-512 backend, Edwards or Ristretto computations including scalar multiplication with an attacker-chosen point could be made to be incorrect. No other backends are affected. x-only multiplication used in `x25519-dalek` is unaffected. `ed25519-dalek` _may_ be affected, though, in the worst case, a valid signature under an attacker-chosen public key would appear as invalid.\n\n## Workaround\n\nThe workaround depends on the version you're using:\n\n|Version|Workaround|\n|-------|----------|\n|`5.0.0` | Do not compile with `--cfg curve25519_dalek_backend=\"avx512\"` and do not build with `target_feature=+avx512ifma,+avx512vl` or `-C target-cpu=native` on an AVX-512 target. You can set `--cfg curve25519_dalek_backend=\"simd\"` instead. |\n|`4.2.0–5.0.0-rc.1` | Do not set `--cfg curve25519_dalek_backend=\"unstable_avx512\"`. Or compile on stable. |\n|`4.0.0–4.1.3` | Override the backend to `--cfg curve25519_dalek_backend=\"serial\"`, or compile on stable. |\n|`1.1.0–3.2.1` | Do not set the `simd_backend` feature. Or do not set `target_feature=+avx512ifma` or `-C target-cpu=native` on an AVX-512 target in the build. |\n\n## More Details\n\nA more complete writeup can be found at https://github.com/dalek-cryptography/curve25519-dalek/issues/934","format":"markdown","source":"rustsec"}],"published":"2026-11-29T12:00:00.000Z","modified":"2026-11-29T16:45:02.223Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"1.1.0","status":"affected","fixed":"5.1.0"}],"ecosystem":"crates.io","package":"curve25519-dalek","purl":"pkg:cargo/curve25519-dalek","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/curve25519-dalek","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0620.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/dalek-cryptography/curve25519-dalek/issues/934","tags":["report"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0620","url":"https://rustsec.org/advisories/RUSTSEC-2026-0620.html","licence":"CC0-1.0","modified":"2026-11-29T16:45:02.223Z"}],"updatedAt":"2026-11-29T17:17:10.883Z"}