Swiftnio Http\/2Application · Apple

CVE-2022-0618

HIGH · 7.5 CVSS v3.1 Published 2022-03-10
Fix available
A fix is available. Upgrade to 1.20.0 or later.
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
A program using swift-nio-http2 is vulnerable to a denial of service attack, caused by a network peer sending a specially crafted HTTP/2 frame. This vulnerability is caused by a logical error when parsing a HTTP/2 HEADERS or HTTP/2 PUSH_PROMISE frame where the frame contains padding information without any other data. This logical error caused confusion about the size of the frame, leading to a parsing error. This parsing error immediately crashes the entire process. Sending a HEADERS frame or PUSH_PROMISE frame with HTTP/2 padding information does not require any special permission, so any HTTP/2 connection peer may send such a frame. For clients, this means any server to which they connect may launch this attack. For servers, anyone they allow to connect to them may launch such an attack. The attack is low-effort: it takes very little resources to send an appropriately crafted frame. The impact on availability is high: receiving the frame immediately crashes the server, dropping all in-flight connections and causing the service to need to restart. It is straightforward for an attacker to repeatedly send appropriately crafted frames, so attackers require very few resources to achieve a substantial denial of service. The attack does not have any confidentiality or integrity risks in and of itself: swift-nio-http2 is parsing the frame in memory-safe code, so the crash is safe. However, sudden process crashes can lead to violations of invariants in services, so it is possible that this attack can be used to trigger an error condition that has confidentiality or integrity risks. The risk can be mitigated if untrusted peers can be prevented from communicating with the service. This mitigation is not available to many services. The issue is fixed by rewriting the parsing code to correctly handle the condition. The issue was found by automated fuzzing by oss-fuzz.

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

A logical error in swift-nio-http2's parsing of HTTP/2 HEADERS and PUSH_PROMISE frames allows any peer to send a specially crafted frame containing padding without other data, causing the parser to miscalculate frame size and crash the entire process.

MitigationPrevent untrusted peers from connecting, or upgrade to the patched version of swift-nio-http2 that correctly handles padding-only frames.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Swiftnio Http\/2Application
Affected:>= 1.0.0, < 1.20.0

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. Verify swift-nio-http2 is present in the project
    Inspect the project's dependency manifest (Package.swift, Package.resolved, Podfile.lock, or equivalent) and search for the swift-nio-http2 package
    Affected if swift-nio-http2 is listed as a dependency
  2. Identify the installed version of swift-nio-http2
    Locate the resolved or locked version of swift-nio-http2 in the dependency lock file (such as Package.resolved, Package.lock, or Podfile.lock)
    Affected if The resolved version is >= 1.0.0 and < 1.20.0
  3. Confirm HTTP/2 server functionality is enabled
    Inspect the application code and configuration to determine if the system acts as an HTTP/2 server using NIO and accepts incoming HTTP/2 connections
    Affected if The application runs an HTTP/2 server using swift-nio-http2 to handle incoming connections
  4. Determine if the HTTP/2 server accepts untrusted connections
    Review network listener configuration, firewall rules, and authentication layers to see if the HTTP/2 port is exposed to untrusted or unauthenticated clients
    Affected if The HTTP/2 server accepts connections from untrusted or unauthenticated peers on any network interface

The environment is affected if swift-nio-http2 version 1.0.0 through 1.19.x is in use and the application operates as an HTTP/2 server that accepts connections from untrusted peers.

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.

dbcve · scoped
Upgrade available Upgrade to 1.20.0 or later
Fixed in 1.20.0
Interim mitigation

Prevent untrusted peers from connecting, or upgrade to the patched version of swift-nio-http2 that correctly handles padding-only frames.

Recommended fix High confidence

swift-nio-http2 version 1.20.0

  1. 1. Identify all projects or services that depend on swift-nio-http2 with version < 1.20.0
  2. 2. Update the package dependency to swift-nio-http2 version 1.20.0 or later
  3. 3. Rebuild and redeploy the affected services
  4. 4. Verify the services start successfully and handle HTTP/2 connections normally

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Swiftnio Http\/2 Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,930
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-0618 — 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-2022-0618 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