Vulnerability details

CVE-2025-0343

Swift Project Swift ASN1
CVSS 3.1
7.5High

Official description

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.

CVSS scores

ScoreVersionSourceVector
7.5High 3.1 CISA ADP / Vulnrichment (CISA-ADP) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected products

VendorProductVersionsSource
Swift Project Swift ASN1 1.0.0 ≤ v < 1.3.1 CVEProject cvelistV5 (CNA)

References and advisories

1
Kolun on Telegram @kolunsec Exploited CVEs, key news and a daily digest Alerts for this product's next CVEsFollow the product to get new vulnerabilities on Telegram.

Details

Published
2025-01-15
Last updated
2025-03-24
State
Published
Assigner (CNA)
Swift

Exploit prediction (EPSS)

0.34%
Probability of exploitation in 30 days
28.2%
Percentile (among all CVEs)

SSVC assessment (CISA)

Automatable
Yes
Exploitation
None
Technical impact
Partial

Weaknesses (CWE)

  • CWE-228
    Improper Handling of Syntactically Invalid Structure