CWE-228Weakness · CWE-228

CVE-2025-0343

HIGH · 7.5 CVSS v3.1 Published 2025-01-15
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges Zero-click

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 · unedited
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.

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 confidence

The 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.

MitigationUpdate 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.

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 checks

Work through these to decide whether this CVE applies to you.

  1. Identify Swift ASN.1 library usage
    Review your project dependencies (Package.swift, Podfile, or Carthage) to confirm the swift-asn1 library is included
    Affected if The library is present in dependencies and handles ASN.1 parsing
  2. Determine installed Swift ASN.1 version
    Check your lock file or dependency manifest for the swift-asn1 version number, then compare it to the fixed version released for CVE-2025-0343
    Affected if The version is older than the patched release containing the fix
  3. Confirm BER/DER input processing
    Review 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
  4. Check for ASN.1 parsing crash logs
    Review application logs, crash reports, or error monitoring for Swift precondition failures related to ASN.1 decoding occurring recently
    Affected if Recent crashes mention ASN.1 parsing or decoding failures with precondition assertions
  5. Inspect ASN.1 decoder configuration
    Look at how the ASN.1 decoder is initialized and whether strict DER/BER validation is enabled or can be enabled
    Affected 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Update 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.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA2.0 h
16.0 hours of engineering $2,800
Get help mitigating

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-0343 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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