Advisory Database
  • Advisories
  • Dependency Scanning
  1. swift
  2. ›
  3. swift-crypto
  4. ›
  5. CVE-2026-28815

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

April 3, 2026

The X-Wing decapsulation path accepts attacker-controlled encapsulated ciphertext bytes without enforcing the required fixed ciphertext length. The decapsulation call is forwarded into a C API, which expects a compile-time fixed-size ciphertext buffer of 1120 bytes. This creates an FFI memory-safety boundary issue when a shorter Data value is passed in, because the C code may read beyond the Swift buffer.

The issue is reachable through initialization of an HPKE.Recipient, which decapsulates the provided encapsulatedKey during construction. A malformed encapsulatedKey can therefore trigger undefined behavior instead of a safe length-validation error.

References

  • github.com/advisories/GHSA-9m44-rr2w-ppp7
  • github.com/apple/swift-crypto
  • github.com/apple/swift-crypto/security/advisories/GHSA-9m44-rr2w-ppp7
  • nvd.nist.gov/vuln/detail/CVE-2026-28815

Detect and mitigate CVE-2026-28815 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.0.0 before 4.3.1

Fixed versions

  • 4.3.1

Solution

Upgrade to version 4.3.1 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-787: Out-of-bounds Write

Source file

swift/swift-crypto/CVE-2026-28815.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 03 Apr 2026 12:17:41 +0000.