CVE-2026-28815: Swift Crypto X-Wing HPKE Decapsulation Malformed Ciphertext Vulnerability

swift-crypto Updated 03 Apr 2026

Summary

03/04/2026
Yes i
High
8.8

CVE-2026-28815: Swift Crypto: X-Wing HPKE Decapsulation Accepts Malformed Ciphertext Length. Affects swift-crypto versions >= 4.0.0, < 4.3.1. Fixed in 4.3.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Swift Crypto is a robust cryptographic library designed for Swift applications, providing essential cryptographic functionalities such as encryption, decryption, and key management. It is widely used in secure communications and data protection. However, a vulnerability has been identified in the X-Wing decapsulation process, where the library fails to enforce the required fixed ciphertext length, leading to potential memory safety issues.

Vulnerability Detail

The vulnerability arises from the X-Wing decapsulation path accepting attacker-controlled encapsulated ciphertext bytes without enforcing the required fixed ciphertext length of 1120 bytes. This oversight allows for an out-of-bounds read in the C API, which can lead to undefined behavior, crashes, or memory disclosure. The issue is triggered when a malformed encapsulated key is passed during the initialization of an HPKE.Recipient, which subsequently calls the vulnerable decapsulate function. The lack of a length check before passing data to the C API creates a significant security risk.

How To Fix

Minimum fixed version

4.3.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no specific workarounds to mitigate this vulnerability without updating to the patched version. It is highly recommended to avoid using the vulnerable functionality until the update is applied.

Conclusion

The CVE-2026-28815 vulnerability in Swift Crypto poses a significant risk due to improper handling of ciphertext lengths in the X-Wing decapsulation process. It is essential for developers using this library to update to the patched version to ensure the security and stability of their applications.

See every vulnerability recorded for swift-crypto →

Share this vulnerability

FAQ

CVE-2026-28815 is a vulnerability in the Swift Crypto library that allows for out-of-bounds memory access due to improper handling of ciphertext length in the X-Wing decapsulation process.

If your application uses the affected version of Swift Crypto, it may be susceptible to crashes or memory disclosure when processing malformed encapsulated keys.

While there are no workarounds available, it is crucial to prioritize updating to the patched version as soon as possible to mitigate the risk.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability.

The CVSS score for this vulnerability is 8.8, indicating a high severity level.

How To Fix

Minimum fixed version

4.3.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback