CVE-2026-28975: NIOExtras NIOHTTPRequestDecompressor Ratio Limit Bypass Vulnerability
MODERATECVE-2026-28975 is a MODERATE niohttprequestdecompressor ratio limit bypass vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting NIOExtras libraries in the SwiftURL ecosystem. The issue involves niohttprequestdecompressor ratio limit bypass via inflated content-length. Remediation is available by upgrading affected packages to version 1.34.1.
CVE-2026-28975 at a Glance
How to Fix CVE-2026-28975
To remediate this vulnerability, upgrade all affected NIOExtras dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/apple/swift-nio-extras to 1.34.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/apple/swift-nio-extras
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-28975, inspect your project dependencies for NIOExtras:
inspect dependencies for github.com/apple/swift-nio-extras
Analyze the terminal output to locate any version of NIOExtras in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.34.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. In NIOExtras, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-28975 Affected NIOExtras Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/apple/swift-nio-extras
|
SwiftURL |
< 1.34.1
|
1.34.1
|
References
Frequently Asked Questions
What is CVE-2026-28975?
Which NIOExtras versions are affected?
What version fixes CVE-2026-28975?
Is github.com/apple/swift-nio-extras affected?
What CWE is associated with CVE-2026-28975?
How can I check SwiftURL dependencies for CVE-2026-28975?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6ph5-fww6-vfwv",
"modified" : "2026-06-12T15:08:04Z",
"published" : "2026-06-12T15:08:04Z",
"aliases" : [ "CVE-2026-28975" ],
"summary" : "NIOExtras: NIOHTTPRequestDecompressor ratio limit bypass via inflated Content-Length",
"details" : "### Impact\n\nWhen `NIOHTTPRequestDecompressor` is configured with `.ratio(N)`, the decompression limit is enforced using the `Content-Length` header value from the incoming request rather than the actual number of compressed bytes received. Since `Content-Length` is attacker-controlled, a malicious client can supply an inflated value that causes the ratio check to always pass, effectively disabling the configured decompression limit.\n\nThis allows an attacker to send a small, highly-compressed payload (a \"gzip bomb\") with a falsified `Content-Length` header to bypass the ratio-based protection entirely. The server will decompress the payload without limit, consuming unbounded memory and potentially causing denial of service.\n\nFor example, a gzip payload containing highly repetitive data can achieve amplification ratios of several hundred to one. Under `.ratio(10)` such a payload should be rejected, but if the attacker sets `Content-Length` to match the decompressed size, the check evaluates `decompressed > decompressed * 10` which is always false, and the payload is accepted without error.\n\nAcross repeated requests, this allows sustained memory amplification far exceeding the configured limits with no error raised.\n\n### Relationship to CVE-2020-9840\n\nGHSA-xhhr-p2r9-jmm7 (CVE-2020-9840) found that the `.size` limit checked compressed rather than decompressed bytes and recommended `.ratio` as a workaround. This advisory identifies a distinct flaw in the `.ratio` limit itself: it uses the attacker-supplied `Content-Length` header as the denominator rather than actual consumed compressed bytes. The two vulnerabilities are in the same decompression limit enforcement code but involve non-overlapping logic errors.\n\nUsers who followed the CVE-2020-9840 workaround by switching to `.ratio(N)` are affected by this vulnerability.\n\n### Patches\n\nFixed in swift-nio-extras 1.34.1. The fix unifies the request and response decompressor implementations so that both accumulate actual compressed bytes received (`compressedLength += part.readableBytes`) rather than relying on any header-supplied value.\n\n### Workarounds\n\nUse `.size(N)` instead of `.ratio(N)` if a fixed upper bound on decompressed output is acceptable for the application. The `.size` limit is not affected by this vulnerability as it does not reference `Content-Length`.\n\n### Credits\n\nNIOExtras is grateful to @nathanielmiller23 for their reporting and assistance with the process.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "SwiftURL",
"name" : "github.com/apple/swift-nio-extras"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.34.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/apple/swift-nio-extras/security/advisories/GHSA-6ph5-fww6-vfwv"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apple/swift-nio-extras"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-409", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-12T15:08:04Z",
"nvd_published_at" : null
}
}