CVE-2025-0343
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
15/01/2025
Last modified:
15/04/2026
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&#39;t met.<br />
<br />
Importantly, these constraints are actually required to be true in DER, but that correctness wasn&#39;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.<br />
<br />
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.
Impact
Base Score 3.x
7.50
Severity 3.x
HIGH


