# CVE-2026-43823: When initializing an RSA public key from DER or PEM bytes throws an error, the EVP_PKEY* is double-freed: first in the catch block, then in the deinit.


- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 23 Jul 2026
- **Updated:** 23 Jul 2026
- **Also known as:** GHSA-8q93-f6xh-4f6f

## What is CVE-2026-43823?

CVE-2026-43823 is a high-severity vulnerability in Apple swift-crypto, published on 23 Jul 2026. 

### Official description

When initializing an RSA public key from DER or PEM bytes throws an error, the EVP_PKEY* is double-freed: first in the catch block, then in the deinit. This can lead to a crash on future memory allocations. This double-free manifests when BoringSSL cannot decode the public key from the bytes provided. This vulnerability is addressed in swift-crypto version 4.5.1.

Weakness: CWE-415 (Double Free)

## Which versions are affected by CVE-2026-43823?

It affects 1 product.


Products: Apple Swift-Crypto.

## How do I fix CVE-2026-43823?

Upgrade to a fixed version.

## Is CVE-2026-43823 being exploited?

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

## Other vulnerabilities in Apple swift-crypto

- [CVE-2026-28815](https://insights.sbomify.com/CVE-2026-28815/): Swift Crypto: X-Wing HPKE Decapsulation Accepts Malformed Ciphertext Length (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-43823 and fix it if it is affected.

What it is: CVE-2026-43823 is a high-severity vulnerability in Apple swift-crypto, published on 23 Jul 2026. 
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-43823 exists.

Affected product: Apple swift-crypto. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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