GHSA-8r5v-vm4m-4g25: H2 Remote Code Execution Vulnerability
MODERATEGHSA-8r5v-vm4m-4g25 is a MODERATE remote code execution vulnerability (General Security Weakness) affecting H2 libraries in the crates.io ecosystem. The issue involves resource exhaustion vulnerability in h2 may lead to denial of service (dos). Remediation is available by upgrading affected packages to version 0.3.24, 0.4.2.
GHSA-8r5v-vm4m-4g25 at a Glance
How to Fix GHSA-8r5v-vm4m-4g25
To remediate this vulnerability, upgrade all affected H2 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 h2 to 0.3.24
Upgrade h2 to 0.4.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for h2
How to Check if You Are Affected
To determine whether your application is affected by GHSA-8r5v-vm4m-4g25, inspect your project dependencies for H2:
inspect dependencies for h2
Analyze the terminal output to locate any version of H2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.24), 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 General Security Weakness. In H2, 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
GHSA-8r5v-vm4m-4g25 Affected H2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
h2
|
crates.io |
< 0.3.24
|
0.3.24
|
|
h2
|
crates.io |
≥ 0.4.0
< 0.4.2
|
0.4.2
|
References
Frequently Asked Questions
What is GHSA-8r5v-vm4m-4g25?
Which H2 versions are affected?
What version fixes GHSA-8r5v-vm4m-4g25?
Is h2 affected?
What CWE is associated with GHSA-8r5v-vm4m-4g25?
How can I check crates.io dependencies for GHSA-8r5v-vm4m-4g25?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8r5v-vm4m-4g25",
"modified" : "2024-01-19T15:24:56Z",
"published" : "2024-01-19T15:24:56Z",
"aliases" : [ ],
"summary" : "Resource exhaustion vulnerability in h2 may lead to Denial of Service (DoS)",
"details" : "An attacker with an HTTP/2 connection to an affected endpoint can send a steady stream of invalid frames to force the\ngeneration of reset frames on the victim endpoint.\nBy closing their recv window, the attacker could then force these resets to be queued in an unbounded fashion,\nresulting in Out Of Memory (OOM) and high CPU usage.\n\nThis fix is corrected in [hyperium/h2#737](https://github.com/hyperium/h2/pull/737), which limits the total number of\ninternal error resets emitted by default before the connection is closed.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "h2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.24"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "h2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.4.0"
}, {
"fixed" : "0.4.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/hyperium/h2/pull/737"
}, {
"type" : "WEB",
"url" : "https://github.com/hyperium/h2/commit/59570e11ccddbec85f67a0c7aa353f7730c68854"
}, {
"type" : "WEB",
"url" : "https://github.com/hyperium/h2/commit/d919cd6fd8e0f4f5d1f6282fab0b38a1b4bf999c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hyperium/h2"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0003.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-19T15:24:56Z",
"nvd_published_at" : null
}
}