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.
Published: 2026-07-23
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

During RSA public key initialization from DER or PEM data, a failed BoringSSL decoding triggers a double‑free of the EVP_PKEY* pointer: one release occurs in the catch block and another in the deinitialiser. This double release results in a dangling pointer and eventually crashes subsequent memory allocations, causing the application to terminate. The weakness is a classic double‑free (CWE‑415) and can be triggered by supplying malformed or malicious key material. An attacker who can supply such input to an application using swift‑crypto can force the app to crash, leading to a denial of service.

Affected Systems

Apple’s swift‑crypto library is affected. Versions prior to 4.5.1, which handle RSA public key parsing from DER or PEM bytes, are vulnerable. Any app, service, or framework built with these library versions and that accepts or processes external RSA key material is at risk.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity, while the EPSS score of less than 1% suggests a very low chance of widespread exploitation. The vulnerability is not currently listed in the CISA KEV catalog, implying no public exploitation has been reported. Based on the description, the likely attack vector is the ability to supply malformed key data to the library, which is feasible in both web services that accept key uploads and local applications reading key files. A successful exploit would simply crash the process, denying service to legitimate users.

Generated by OpenCVE AI on August 3, 2026 at 21:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade swift‑crypto to version 4.5.1 or later, which removes the double‑free bug.
  • Validate RSA key inputs before they reach the library; reject or sanitize malformed key data to prevent failed decoding paths.
  • After applying the patch, restart any services that use the library to clear any crashed state and resume normal operation.

Generated by OpenCVE AI on August 3, 2026 at 21:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 25 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Title swift-crypto: swift-crypto: Denial of Service due to double-free during RSA public key initialization
Weaknesses CWE-763
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Apple
Apple swift-crypto
Weaknesses CWE-415
Vendors & Products Apple
Apple swift-crypto
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 23 Jul 2026 15:00:00 +0000

Type Values Removed Values Added
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.
References

Subscriptions

Apple Swift-crypto
cve-icon MITRE

Status: PUBLISHED

Assigner: apple

Published:

Updated: 2026-07-23T18:12:10.258Z

Reserved: 2026-05-01T22:46:27.822Z

Link: CVE-2026-43823

cve-icon Vulnrichment

Updated: 2026-07-23T18:11:55.992Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-23T15:17:05.613

Modified: 2026-07-23T19:16:54.017

Link: CVE-2026-43823

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-23T14:33:20Z

Links: CVE-2026-43823 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T21:30:05Z

Weaknesses