Email me

Rust advisories / ic-cipher

Vulnerability HighRUSTSEC-2026-0337 · ic-cipher

RUSTSEC-2026-0337: Poly1305 panics or computes a wrong tag on attacker-chosen messages of 64 bytes or more

Short answerA security vulnerability in the ic-cipher crate: Poly1305 panics or computes a wrong tag on attacker-chosen messages of 64 bytes or more. High severity (CVSS 7.5). Fixed in 0.2.20: update to a fixed version.

Crateic-cipher
TypeVulnerability (denial-of-service, crypto-failure)
Affected versionsFrom 0.2.5 before 0.2.20.
Fixed in0.2.20
SeverityHigh, CVSS 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published2026-10-09
Last changed2026-10-12
Also known asGHSA-xr22-8pqp-gwfh

What to do

  1. See which version you have: cargo tree -i ic-cipher (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p ic-cipher. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example ic-cipher = "0.2.20") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

Poly1305 in ic-cipher absorbs messages of 64 bytes or more four blocks at a time, summing four products before one reduction. From 0.2.5 to 0.2.19 the reduction kept its carries in 32-bit integers, which four summed products can overflow when the message's bytes are large.

This affects Poly1305 and ChaCha20Poly1305, and everything built on them: the TLS and QUIC ChaCha20-Poly1305 suites in ic-rustls, HPKE with that cipher in ic-hpke, and the re-exports in ic-mac and ironcrypto.

What happens depends on how the crate was compiled:

  • With overflow checks on (any debug build, or a release profile with overflow-checks = true) the multiplication panics, and under panic = "abort" the process ends. The tag is computed over the ciphertext before it is compared, so this happens before authentication and without the key: anyone who can deliver a ChaCha20-Poly1305 ciphertext to be opened can trigger it.
  • With overflow checks off (Cargo's default for release builds) the arithmetic wraps and the tag is computed wrong on the affected messages.

Ordinary data does not reach the defect. A message of 0xff bytes does: in one measurement against 0.2.19, 28 of 500 ChaCha20Poly1305::open_detached calls on 1,024 bytes of 0xff under random keys and nonces panicked in a debug build. ChaCha20-Poly1305 derives a new Poly1305 key for every nonce, so each message is a fresh attempt.

AES-GCM and AES-GCM-SIV are not affected, and neither are messages shorter than 64 bytes.

The flaw was corrected in 0.2.20 by carrying in 64 bits.

It was found by running Project Wycheproof's ChaCha20-Poly1305 test vectors against the library.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ