# CVE-2023-49083: cryptography vulnerable to NULL-dereference when loading PKCS7 certificates

> Attackers can cause a denial of service by triggering a null pointer dereference when loading malformed PKCS7 certificates.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Nov 2023
- **Updated:** 18 Dec 2025
- **Also known as:** ALSA-2024:2337, ALSA-2024:3105, ALSA-2025:14553, ALSA-2025:15874, AZL-32051, AZL-35128, BELL-CVE-2023-49083, CLSA-2025-1763137741, CLSA-2026-1772151045, DEBIAN-CVE-2023-49083, ECHO-d605-0006-a094, GHSA-jfhm-5ghh-2f97, OESA-2023-1887, PYSEC-2023-254, RHSA-2024:10965, RHSA-2024:2337, RHSA-2024:3105, RHSA-2025:13098, RHSA-2025:13100, RHSA-2025:13101, RHSA-2025:13102, RHSA-2025:13103, RHSA-2025:13104, RHSA-2025:14553, RHSA-2025:15874, RLSA-2024:2337, RLSA-2024:3105, RLSA-2025:14553, RLSA-2025:15874, ROOT-APP-PYPI-CVE-2023-49083, SUSE-SU-2023:4842-1, SUSE-SU-2023:4843-1, SUSE-SU-2023:4844-1, SUSE-SU-2023:4921-1, SUSE-SU-2024:2375-1, UBUNTU-CVE-2023-49083, openSUSE-SU-2024:13472-1

## What is CVE-2023-49083?

CVE-2023-49083 is a medium-severity vulnerability in pyca cryptography, published on 29 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Calling `load_pem_pkcs7_certificates` or `load_der_pkcs7_certificates` could lead to a NULL-pointer dereference and segfault. 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. This vulnerability has been patched in version 41.0.6.

Weakness: CWE-476 (NULL Pointer Dereference)

## Which versions are affected by CVE-2023-49083?

3 open source packages ship an affected version, including cryptography. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cryptography` | PyPI | From 3.1 | 41.0.6 |
| `cryptography` | PyPI | From 3.1 | 41.0.6 |
| `cryptography` | PyPI | From 3.1 | 41.0.6 |
| `python3-cryptography` | AlmaLinux:8 | All versions | 3.2.1-8.el8_10 |
| `python3.11-cryptography` | AlmaLinux:8 | All versions | 37.0.2-6.el8 |
| `python3-cryptography` | AlmaLinux:9 | All versions | 36.0.1-5.el9_6 |
| `python3.11-cryptography` | AlmaLinux:9 | All versions | 37.0.2-6.el9 |
| `python3.11-cryptography` | Red Hat:enterprise_linux:8::appstream | All versions | 0:37.0.2-6.el8 |
| `python3.11-cryptography-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:37.0.2-6.el8 |
| `python3.11-cryptography-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:37.0.2-6.el8 |
| `python-cryptography` | Red Hat:enterprise_linux:8::baseos | All versions | 0:3.2.1-8.el8_10 |
| `python-cryptography-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:3.2.1-8.el8_10 |
| `python3-cryptography` | Red Hat:enterprise_linux:8::baseos | All versions | 0:3.2.1-8.el8_10 |
| `python3-cryptography-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:3.2.1-8.el8_10 |
| `python3.11-cryptography` | Red Hat:enterprise_linux:9::appstream | All versions | 0:37.0.2-6.el9 |
| `python3.11-cryptography-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:37.0.2-6.el9 |
| `python3.11-cryptography-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:37.0.2-6.el9 |
| `python-cryptography` | Red Hat:enterprise_linux:9::baseos | All versions | 0:36.0.1-5.el9_6 |
| `python-cryptography-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:36.0.1-5.el9_6 |
| `python3-cryptography` | Red Hat:enterprise_linux:9::baseos | All versions | 0:36.0.1-5.el9_6 |
| `python3-cryptography-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:36.0.1-5.el9_6 |
| `python-cryptography` | Red Hat:rhel_aus:8.4::baseos | All versions | 0:3.2.1-4.el8_4.1 |
| `python-cryptography-debugsource` | Red Hat:rhel_aus:8.4::baseos | All versions | 0:3.2.1-4.el8_4.1 |
| `python3-cryptography` | Red Hat:rhel_aus:8.4::baseos | All versions | 0:3.2.1-4.el8_4.1 |
| `python3-cryptography-debuginfo` | Red Hat:rhel_aus:8.4::baseos | All versions | 0:3.2.1-4.el8_4.1 |
| `python-cryptography` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:3.2.1-5.1.el8_6.1 |
| `python-cryptography-debugsource` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:3.2.1-5.1.el8_6.1 |
| `python3-cryptography` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:3.2.1-5.1.el8_6.1 |
| `python3-cryptography-debuginfo` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:3.2.1-5.1.el8_6.1 |
| `python-cryptography` | Red Hat:rhel_e4s:8.6::baseos | All versions | 0:3.2.1-5.1.el8_6.1 |
| `python-cryptography-debugsource` | Red Hat:rhel_e4s:8.6::baseos | All versions | 0:3.2.1-5.1.el8_6.1 |
| `python3-cryptography` | Red Hat:rhel_e4s:8.6::baseos | All versions | 0:3.2.1-5.1.el8_6.1 |
| `python3-cryptography-debuginfo` | Red Hat:rhel_e4s:8.6::baseos | All versions | 0:3.2.1-5.1.el8_6.1 |
| `python-cryptography` | Red Hat:rhel_e4s:8.8::baseos | All versions | 0:3.2.1-6.el8_8 |
| `python-cryptography-debugsource` | Red Hat:rhel_e4s:8.8::baseos | All versions | 0:3.2.1-6.el8_8 |
| `python3-cryptography` | Red Hat:rhel_e4s:8.8::baseos | All versions | 0:3.2.1-6.el8_8 |
| `python3-cryptography-debuginfo` | Red Hat:rhel_e4s:8.8::baseos | All versions | 0:3.2.1-6.el8_8 |
| `python-cryptography` | Red Hat:rhel_e4s:9.0::appstream | All versions | 0:36.0.1-1.el9_0.1 |
| `python-cryptography-debugsource` | Red Hat:rhel_e4s:9.0::appstream | All versions | 0:36.0.1-1.el9_0.1 |
| `python3-cryptography` | Red Hat:rhel_e4s:9.0::appstream | All versions | 0:36.0.1-1.el9_0.1 |

Products: Cryptography.io Cryptography.

## How do I fix CVE-2023-49083?

Upgrade cryptography to 41.0.6 or later.

## Is CVE-2023-49083 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-49083 exists.

## Other vulnerabilities in pyca cryptography

- [CVE-2020-36242](https://insights.sbomify.com/CVE-2020-36242/): PyCA Cryptography symmetrically encrypting large values can lead to integer overflow (critical 9.1)
- [CVE-2026-26007](https://insights.sbomify.com/CVE-2026-26007/): cryptography Subgroup Attack Due to Missing Subgroup Validation for SECT Curves (high 8.2)
- [CVE-2024-26130](https://insights.sbomify.com/CVE-2024-26130/): cryptography NULL pointer dereference with pkcs12.serialize_key_and_certificates when called with a non-matching certificate and private key and an hmac_hash override (high 7.5)
- [CVE-2023-38325](https://insights.sbomify.com/CVE-2023-38325/): cryptography mishandles SSH certificates (high 7.5)
- [CVE-2026-39892](https://insights.sbomify.com/CVE-2026-39892/): cryptography has a buffer overflow if non-contiguous buffers were passed to APIs (medium 6.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-49083 and fix it if it is affected.

What it is: CVE-2023-49083 is a medium-severity vulnerability in pyca cryptography, published on 29 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-49083 exists.

Affected packages and fixed versions:
- cryptography (PyPI): affected from 3.1; fixed in 41.0.6
- cryptography (PyPI): affected from 3.1; fixed in 41.0.6
- cryptography (PyPI): affected from 3.1; fixed in 41.0.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-49083/ (Markdown: https://insights.sbomify.com/CVE-2023-49083/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-49083
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-49083
- OSV: https://osv.dev/vulnerability/CVE-2023-49083

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-49083/
Summaries are generated and may contain mistakes; the official description above is the record.
