CVE-2025-0343
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedSwift 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe Swift ASN.1 library crashes due to a precondition failure when parsing BER/DER data that violates expected constructed/primitive form constraints. The library incorrectly assumes these constraints were enforced during early parsing and relies on them during later decoding stages, triggering a graceful crash when malformed data is processed.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Swift ASN.1 library usageReview your project dependencies (Package.swift, Podfile, or Carthage) to confirm the swift-asn1 library is includedAffected if The library is present in dependencies and handles ASN.1 parsing
-
Determine installed Swift ASN.1 versionCheck your lock file or dependency manifest for the swift-asn1 version number, then compare it to the fixed version released for CVE-2025-0343Affected if The version is older than the patched release containing the fix
-
Confirm BER/DER input processingReview code that invokes ASN.1 parsing functions to identify if it processes data from external or untrusted sources (network input, files from users, etc.)Affected if The application parses BER/DER data from untrusted or network sources
-
Check for ASN.1 parsing crash logsReview application logs, crash reports, or error monitoring for Swift precondition failures related to ASN.1 decoding occurring recentlyAffected if Recent crashes mention ASN.1 parsing or decoding failures with precondition assertions
-
Inspect ASN.1 decoder configurationLook at how the ASN.1 decoder is initialized and whether strict DER/BER validation is enabled or can be enabledAffected if The decoder lacks input validation for constructed/primitive form constraints
You are affected if your application uses a version of Swift ASN.1 older than the patched release and processes BER/DER data from untrusted sources, or if you observe crashes during ASN.1 parsing operations.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
From vendor dataUpdate the Swift ASN.1 library to versions that properly handle both constructed and primitive ASN.1 forms, or validate input DER/BER data before parsing to reject malformed content from untrusted sources.
- Consultation2.0 h
- Implementation8.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,480.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-0343 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-0343 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data