# CVE-2024-0727: PKCS12 Decoding crashes

> Attackers can cause a denial of service by providing a maliciously formatted PKCS12 file to applications using vulnerable OpenSSL APIs.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 26 Jan 2024
- **Updated:** 15 Oct 2026
- **Also known as:** ALPINE-CVE-2024-0727, AZL-33935, AZL-33937, AZL-35049, AZL-35086, AZL-37767, AZL-39649, AZL-42721, AZL-42730, AZL-78540, BELL-CVE-2024-0727, CLEANSTART-2026-ID27174, CLSA-2024-1710183809, CLSA-2024-1710786990, DEBIAN-CVE-2024-0727, ECHO-4cb4-2781-3bb1, GHSA-9v9h-cgj8-h64p, JLSEC-2026-247, MINI-fqgr-h3xp-wx2j, OESA-2024-1147, PYSEC-2026-1285, ROOT-APP-PYPI-CVE-2024-0727, SUSE-SU-2024:0549-1, SUSE-SU-2024:0813-1, SUSE-SU-2024:0814-1, SUSE-SU-2024:0815-1, SUSE-SU-2024:0831-1, SUSE-SU-2024:0832-1, SUSE-SU-2024:0833-1, SUSE-SU-2024:0840-1, SUSE-SU-2024:0841-1, SUSE-SU-2024:0842-1, UBUNTU-CVE-2024-0727, openSUSE-SU-2024:13656-1, openSUSE-SU-2024:13662-1, openSUSE-SU-2024:13663-1, openSUSE-SU-2026:11592-1

## What is CVE-2024-0727?

CVE-2024-0727 is a medium-severity vulnerability in Openssl Openssl, published on 26 Jan 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Issue summary: Processing a maliciously formatted PKCS12 file may lead OpenSSL
to crash leading to a potential Denial of Service attack

Impact summary: Applications loading files in the PKCS12 format from untrusted
sources might terminate abruptly.

A file in PKCS12 format can contain certificates and keys and may come from an
untrusted source. The PKCS12 specification allows certain fields to be NULL, but
OpenSSL does not correctly check for this case. This can lead to a NULL pointer
dereference that results in OpenSSL crashing. If an application processes PKCS12
files from an untrusted source using the OpenSSL APIs then that application will
be vulnerable to this issue.

OpenSSL APIs that are vulnerable to this are: PKCS12_parse(),
PKCS12_unpack_p7data(), PKCS12_unpack_p7encdata(), PKCS12_unpack_authsafes()
and PKCS12_newpass().

We have also fixed a similar issue in SMIME_write_PKCS7(). However since this
function is related to writing data we do not consider it security significant.

The FIPS modules in 3.2, 3.1 and 3.0 are not affected by this issue.

Weakness: CWE-476 (NULL Pointer Dereference)

## Which versions are affected by CVE-2024-0727?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cryptography` | PyPI | All versions | 42.0.2 |
| `cryptography` | PyPI | All versions | 42.0.2 |
| `cryptography` | PyPI | All versions | 42.0.2 |
| `openssl-1_0_0` | SUSE:Enterprise Storage 7.1 | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Enterprise Storage 7.1 | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_1` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 1.1.1l-150400.7.63.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 1.1.1l-150400.7.63.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Micro 5.1 | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Micro 5.2 | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Micro 5.3 | All versions | 1.1.1l-150400.7.63.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Micro 5.4 | All versions | 1.1.1l-150400.7.63.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Micro 5.5 | All versions | 1.1.1l-150500.17.25.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 1.1.1l-150500.17.25.1 |
| `openssl-3` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 3.0.8-150500.5.27.1 |
| `compat-openssl098` | SUSE:Linux Enterprise Module for Legacy 12 | All versions | 0.9.8j-106.64.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Module for Legacy 15 SP5 | All versions | 1.0.2p-150000.3.91.1 |
| `openssl` | SUSE:Linux Enterprise Server 11 SP4 LTSS EXTREME CORE | All versions | 0.9.8j-0.106.83.1 |
| `openssl1` | SUSE:Linux Enterprise Server 11 SP4 LTSS EXTREME CORE | All versions | 1.0.1g-0.58.79.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 1.0.2p-3.90.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 1.1.1d-2.104.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 1.1.1l-150400.7.63.1 |
| `compat-openssl098` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 0.9.8j-106.64.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 1.0.2p-3.90.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 1.1.1d-2.104.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.1.1d-150200.11.85.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 1.0.2p-150000.3.91.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 1.1.1l-150400.7.63.1 |

Products: Openssl Openssl.

## How do I fix CVE-2024-0727?

Upgrade cryptography to 42.0.2 or later.

## Is CVE-2024-0727 being exploited?

There is no known exploitation of CVE-2024-0727 in the wild and no public exploit code.

## Other vulnerabilities in Openssl Openssl

- [CVE-2009-3245](https://insights.sbomify.com/CVE-2009-3245/): Null dereference in n/a (critical 10.0)
- [CVE-2006-3738](https://insights.sbomify.com/CVE-2006-3738/): Memory corruption in n/a (critical 10.0)
- [CVE-2026-63073](https://insights.sbomify.com/CVE-2026-63073/): Untrusted Sender DN Used as Format String in CMP Response Validation (critical 9.8)
- [CVE-2016-6309](https://insights.sbomify.com/CVE-2016-6309/): Use after free in n/a (critical 9.8)
- [CVE-2016-0799](https://insights.sbomify.com/CVE-2016-0799/): Integer overflow in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-0727 and fix it if it is affected.

What it is: CVE-2024-0727 is a medium-severity vulnerability in Openssl Openssl, published on 26 Jan 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-0727 in the wild and no public exploit code.

Affected packages and fixed versions:
- cryptography (PyPI): affected all versions; fixed in 42.0.2
- cryptography (PyPI): affected all versions; fixed in 42.0.2
- cryptography (PyPI): affected all versions; fixed in 42.0.2

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-2024-0727/ (Markdown: https://insights.sbomify.com/CVE-2024-0727/index.md)
```

## Sources

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

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