GHSA-w7hm-hmxv-pvhf json
HPACK decoder panics on invalid input
published 3y ago modified 3mo ago also RUSTSEC-2023-0085
- cvss
- 7.5
- version 3.1, GitHub
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
Due to insufficient checking of input data, decoding certain data sequences can lead to _Decoder::decode_ panicking rather than returning an error.
Example code that triggers this vulnerability looks like this:
```rust use hpack::Decoder;
pub fn main() { let input = &[0x3f]; let mut decoder = Decoder::new(); let _ = decoder.decode(input); } ```
hpack is unmaintained. A crate with the panics fixed has been published as [hpack-patched](https://crates.io/crates/hpack-patched).
Also consider using [fluke-hpack](https://crates.io/crates/fluke-hpack) or [httlib-huffman](https://crates.io/crates/httlib-huffman) as an alternative.
Patch / fix
Is GHSA-w7hm-hmxv-pvhf in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | hpack | <=0.3.0 >=0.0.0-0 |
no fix listed |
Classification
- Weakness
-
- CWE-754 Improper Check for Unusual or Exceptional Conditions
References
Sources
- GitHub Advisory GHSA-w7hm-hmxv-pvhf
- OSV RUSTSEC-2023-0085
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.