Miggo Logo

CVE-2022-0618: Denial of service via HTTP/2 HEADERS frames padding

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.75655%
CWE
-
Published
6/9/2023
Updated
2/9/2024
KEV Status
No
Technology
TechnologySwift

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/apple/swift-nio-http2swift>= 1.0.0, < 1.201.20

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from improper handling of padding in HEADERS/PUSH_PROMISE frames. The commit diff shows:

  1. New state machine transitions (AwaitingPaddingLengthByteParserState) were added to handle padding validation
  2. Added explicit checks for header.length > 0 when padding flag is set
  3. The original code in AccumulatingFrameHeaderParserState.process() didn't properly validate that padded frames must have at least 1 byte for the padding length field
  4. The original AccumulatingPayloadParserState initialization didn't properly handle cases where padding length exceeded remaining payload size
  5. Added explicit protocolError throws when (header.length <= expectedPadding) in the new logic These changes indicate the vulnerable functions were in the frame header processing and payload initialization paths that handled padding validation.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* pro*r*m usin* swi*t-nio-*ttp* is vuln*r**l* to * **ni*l o* s*rvi** *tt**k, **us** *y * n*twork p**r s*n*in* * sp**i*lly *r**t** *TTP/* *r*m*. T*is *tt**k *****ts *ll swi*t-nio-*ttp* v*rsions *rom *.*.* to *.**.*. It is *ix** in *.**.* *n* l*t*r r*l

Reasoning

T** vuln*r**ility st*mm** *rom improp*r **n*lin* o* p***in* in *****RS/PUS*_PROMIS* *r*m*s. T** *ommit *i** s*ows: *. N*w st*t* m***in* tr*nsitions (*w*itin*P***in*L*n*t**yt*P*rs*rSt*t*) w*r* ***** to **n*l* p***in* v*li**tion *. ***** *xpli*it ****k