Security mailing lists by PureSourceCode

CVE-2025-0343

HIGH 7.5CVSS 3.1

CVE-2025-0343: Swift ASN.1 can crash when parsing maliciously formed BER/DER

Swift ASN.1 can be caused to crash when parsing certain BER/DER constructions. This crash is caused by a confusion in the ASN.1 library itself which assumes that certain objects can only be provided in either constructed or primitive forms, and will trigger a preconditionFailure if that constraint isn't met.

Importantly, these constraints are actually required to be true in DER, but that correctness wasn't enforced on the early node parser side so it was incorrect to rely on it later on in decoding, which is what the library did.

These crashes can be triggered when parsing any DER/BER format object. There is no memory-safety issue here: the crash is a graceful one from the Swift runtime. The impact of this is that it can be used as a denial-of-service vector when parsing BER/DER data from unknown sources, e.g. when parsing TLS certificates.

Published
15 Jan 2025
Last modified
17 Jun 2026
Assigned by
cve@forums.swift.org
NVD status
Deferred
Weakness
CWE-228
Also known as
GHSA-w8xv-rwgf-4fwh
Sources
NVDJSONOSV GHSA-w8xv-rwgf-4fwhJSON

Scores

SourceScored byVersionScoreVector / decision
NVD 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV SwiftURL github.com/apple/swift-asn1 < 1.3.1 1.3.1

References

History

  • 25 Nov 2026 20:57 UTC · NVD: first stored (published 15 Jan 2025)
  • 25 Nov 2026 20:15 UTC · OSV: first stored (published 14 Jan 2025)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.