Miggo Logo

CVE-2022-24666: swift-nio-http2 vulnerable to denial of service via invalid HTTP/2 HEADERS frame length

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.85074%
Published
5/18/2023
Updated
7/27/2023
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.19.21.19.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from missing length validation when parsing HEADERS frames with priority data. The commit diff shows a guard statement was added to check if bytesToRead >=5 when priority flag is present. The affected code path is in HTTP2FrameParser.swift where headers payload parsing occurs. The tests added in the commit specifically target this scenario by sending frames with priority flags and insufficient lengths, confirming the vulnerable code path.

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*ms *rom missin* l*n*t* v*li**tion w**n p*rsin* *****RS *r*m*s wit* priority **t*. T** *ommit *i** s*ows * *u*r* st*t*m*nt w*s ***** to ****k i* *yt*sToR*** >=* w**n priority *l** is pr*s*nt. T** *****t** *o** p*t* is in *TTP**r*m