Intel

AIKIDO-2026-94131

cryptography is vulnerable to Integer Overflow or Wraparound

Integer Overflow or Wraparound Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Yesterday

59

Medium Risk

This Affects:

PYTHONcryptography
2.1.0 - 48.0.1
Fixed in 49.0.0
Are you affected? Scan for Free

TL;DR

The raw ChaCha20 cipher API treats the first four bytes of the 16-byte nonce as a 32-bit little-endian block counter per RFC 7539. Before the fix, encrypting or decrypting past that counter limit let the underlying implementation silently diverge from RFC 7539 instead of failing. An application that processes enough attacker-influenced data with a near-overflow counter can therefore continue with incorrect keystream material. The library now tracks processed bytes and raises ValueError before the counter would overflow.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and calling the raw ChaCha20 cipher API (not only ChaCha20Poly1305) on attacker-influenced data volumes or nonce counter values.

Background info

cryptography is vulnerable to Integer Overflow or Wraparound in versions 2.1.0 - 48.0.1.

How to fix this

Upgrade the cryptography library to the patch version.