Executive brief
The pyca/cryptography library, a widely used Python package for secure data handling, distributed pre-compiled versions (wheels) containing a vulnerable version of the OpenSSL security engine. An attacker could exploit these underlying flaws to cause application crashes, memory corruption, or potentially execute unauthorized code. Organizations using the standard pre-built versions of this library should update to ensure their encryption infrastructure remains secure.
Technical details
The pyca/cryptography library's pre-compiled 'wheels' (distributed via PyPI) include a statically linked copy of OpenSSL that is vulnerable to several security issues, most notably a high-severity heap use-after-free in the PKCS7_verify() function. This specific flaw is triggered by specially crafted PKCS#7 or S/MIME signed messages containing an empty ASN.1 SET in the digestAlgorithms field, leading to incorrect freeing of a caller-owned BIO object. Attackers can exploit this via the network without authentication to cause a denial-of-service (crash) or potentially achieve remote code execution. Other bundled vulnerabilities include cryptographic bypasses in CMS AuthEnvelopedData and memory exhaustion in QUIC handling. Users are advised to upgrade to version 48.0.1.
Affected products
- pyca cryptography >= 0.5.0, < 48.0.1
Timeline
- 2026-06-09: disclosed: Initial disclosure of OpenSSL vulnerabilities and cryptography advisory.
- 2026-06-15: advisory: GitHub Advisory published.