{"id":"CVE-2025-0343","published":"2025-01-15T00:48:07Z","modified":"2025-03-24T16:07:03Z","title":"Swift ASN.1 can be caused to crash when parsing certain BER/DER constructions","vendor":"Swift Project","product":"Swift ASN1","tier":"tail","description":{"text":"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.\n\nImportantly, 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.\n\nThese 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00345,"percentile":0.28842,"provenance":"source"},"cwes":[{"id":"CWE-228","name":"Improper Handling of Syntactically Invalid Structure"}],"references":[{"url":"https://github.com/apple/swift-asn1/security/advisories/GHSA-w8xv-rwgf-4fwh","tags":[]}],"priority":{"score":11.0,"factors":[{"name":"EPSS percentile","points":5.77},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"swift-project","affectedVersions":[{"vendor":"Swift Project","product":"Swift ASN1","versions":[">= 1.0.0, < 1.3.1"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-01-15T14:55:10.749413Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"SwiftURL","package":"github.com/apple/swift-asn1","vulnerableRanges":["<1.3.1"],"patched":["1.3.1"],"from":["GHSA-w8xv-rwgf-4fwh"],"provenance":"source"}],"summary":{"text":"The Swift ASN1 library from the Swift Project mishandles certain BER/DER constructions during parsing, because it wrongly assumes some objects can only appear in either constructed or primitive form and triggers a preconditionFailure when that assumption is violated. An attacker who can supply BER/DER-encoded data to the parser, such as a TLS certificate from an untrusted source, can crash the process over the network without authentication or user interaction, causing a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:56:31Z"},"euvd":{"id":"EUVD-2025-0068","exploited":false,"provenance":"source"}}