CVE-2025-0343
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HSummary
CVE-2025-0343 is a high-severity Improper Handling of Syntactically Invalid Structure (CWE-228) vulnerability. Its CVSS base score is 7.5 (High).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 26th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2025-0343 is a vulnerability in Apple's Swift ASN.1 library that causes a crash during parsing of certain BER/DER constructions. The issue arises from a confusion within the ASN.1 library, which assumes specific objects are provided only in either constructed or primitive forms and triggers a preconditionFailure if this constraint is violated. While these constraints are required in DER, the early node parser did not enforce them, leading to incorrect reliance during later decoding stages. The crash is graceful, triggered by the Swift runtime with no memory-safety issues involved.
Any network-accessible attacker can exploit this vulnerability with low complexity and no privileges required, as reflected in its CVSS v3.1 score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). Exploitation occurs by supplying malformed BER/DER data from untrusted sources, such as TLS certificates, causing the parser to crash and resulting in a denial-of-service condition against applications using the library.
The primary advisory is available at https://github.com/apple/swift-asn1/security/advisories/GHSA-w8xv-rwgf-4fwh, which details the vulnerability in the swift-asn1 repository. It is associated with CWE-228 (Implementation). The vulnerability was published on 2025-01-15.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2025-0068
Vulnerability Data
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…
more
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.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5) AI
SI-10 requires validity checks on information inputs, directly stopping syntactically malformed data from being processed without proper handling.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices directly require robust input validation and syntax handling to prevent malformed-structure flaws.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Security testing can detect malformed-input issues but does not itself implement the handling logic.
Secure development life cycle mandates input validation and error handling that directly prevents improper handling of syntactically invalid structures.
Application security requirements include explicit rules for input validation and malformed-data handling.
Secure system architecture principles encourage robust input handling but do not prescribe the specific coding practice.
Secure coding explicitly requires validation of all input syntax and structure, directly eliminating CWE-228.