Junglewise Threat Intelligence

cryspen libcrux denial of service in ChaCha20-Poly1305 encryption

Severity: high · CVSS 8.2 · Published 2026-05-19

Technologies: libcrux-chacha20poly1305 (crates.io). Vendors: crates.io.

Executive brief

libcrux is a cryptographic library used by applications to perform secure encryption. A flaw in its ChaCha20-Poly1305 implementation can cause an application to crash if it processes a ciphertext buffer that is longer than expected. This could allow a remote attacker to disrupt services or cause a denial-of-service state by providing specially crafted input.

Technical details

A vulnerability exists in the libcrux_chacha20poly1305::encrypt and libcrux_chacha20poly1305::xchacha20_poly1305::encrypt functions where providing a ciphertext buffer larger than the required size (plaintext length + TAG_LEN) triggers a Rust panic. This is classified as a buffer management issue (CWE-120) where the library fails to handle overlong output buffers gracefully. If an application allows the ciphertext buffer length to be influenced by external input, a remote attacker can trigger a crash, leading to a denial of service. The issue is resolved in version 0.0.8, which ensures the library writes only the necessary bytes to the buffer instead of panicking.

Affected products

  • cryspen libcrux-chacha20poly1305 < 0.0.8

Timeline

  • 2026-03-29: other: Reported
  • 2026-04-14: patched: Fix merged in pull request 1386
  • 2026-05-19: advisory: GitHub Advisory published

References

Related threats