GHSA-w7hm-hmxv-pvhf: Hpack HPACK Decoder Panics On Invalid Vulnerability
HIGHGHSA-w7hm-hmxv-pvhf is a HIGH (CVSS 7.5) hpack decoder panics on invalid vulnerability (CWE-754: Improper Check for Unusual or Exceptional Conditions) affecting Hpack libraries in the crates.io ecosystem. The issue involves hpack decoder panics on invalid input. Remediation is available in the latest vendor maintenance releases.
GHSA-w7hm-hmxv-pvhf at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix GHSA-w7hm-hmxv-pvhf
To remediate this vulnerability, upgrade all affected Hpack 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 hpack to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for hpack
How to Check if You Are Affected
To determine whether your application is affected by GHSA-w7hm-hmxv-pvhf, inspect your project dependencies for Hpack:
inspect dependencies for hpack
Analyze the terminal output to locate any version of Hpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-754: Improper Check for Unusual or Exceptional Conditions, where the product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product. In Hpack, 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-w7hm-hmxv-pvhf Affected Hpack Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hpack
|
crates.io |
≤ 0.3.0
|
|
References
Frequently Asked Questions
What is GHSA-w7hm-hmxv-pvhf?
Which Hpack versions are affected?
What version fixes GHSA-w7hm-hmxv-pvhf?
Is hpack affected?
What is the CVSS score of GHSA-w7hm-hmxv-pvhf?
What CWE is associated with GHSA-w7hm-hmxv-pvhf?
How can I check crates.io dependencies for GHSA-w7hm-hmxv-pvhf?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w7hm-hmxv-pvhf",
"modified" : "2024-04-05T15:06:27Z",
"published" : "2024-04-05T15:06:27Z",
"aliases" : [ ],
"summary" : "HPACK decoder panics on invalid input",
"details" : "Due to insufficient checking of input data, decoding certain data sequences can lead to _Decoder::decode_ panicking rather than returning an error.\n\nExample code that triggers this vulnerability looks like this:\n\n```rust\nuse hpack::Decoder;\n\npub fn main() {\n let input = &[0x3f];\n let mut decoder = Decoder::new();\n let _ = decoder.decode(input);\n}\n```\n\nhpack is unmaintained. A crate with the panics fixed has been published as [hpack-patched](https://crates.io/crates/hpack-patched).\n\nAlso consider using [fluke-hpack](https://crates.io/crates/fluke-hpack) or [httlib-huffman](https://crates.io/crates/httlib-huffman) as an alternative.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "hpack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mlalic/hpack-rs/issues/11"
}, {
"type" : "WEB",
"url" : "https://github.com/sno2/hpack-rs-patched/commit/d669282924a95311599e9e7dd53869ee96b3a2f5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mlalic/hpack-rs"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0085.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-754" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-05T15:06:27Z",
"nvd_published_at" : null
}
}