ADVISORIES

GitHub Advisory Database

GHSA-p423-j2cm-9vmq

Cryptography vulnerable to buffer overflow if non-contiguous buffers were passed to APIs

Details

If a non-contiguous buffer was passed to APIs which accepted Python buffers (e.g. Hash.update()), this could lead to buffer overflows. For example:

h = Hash(SHA256())
b.update(buf[::-1])

would read past the end of the buffer on Python >3.11

Affected packages

EcosystemPackageAffected versions
PyPIcryptography
From 45.0.0 before 46.0.7 (fixed in 46.0.7)

References