---
id: CVE-2026-43823
title: >-
  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
summary: >-
  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
  whe…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-415
vendor: apple
product: swift-crypto
affected:
  - 'swift-crypto >= 3.2.0, <= 4.5.1'
published: '2026-07-23'
updated: '2026-09-04'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-43823'
references:
  - url: >-
      https://github.com/apple/swift-crypto/security/advisories/GHSA-8q93-f6xh-4f6f
    label: product-security@apple.com
  - url: >-
      https://github.com/apple/swift-crypto/security/advisories/GHSA-8q93-f6xh-4f6f
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
epss: 0.00428
epssPercentile: 0.34351
ingestedAt: '2026-09-05T13:39:55.897Z'
---

## Overview

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.

## Affected

- `swift-crypto >= 3.2.0, <= 4.5.1`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
