Skip to content
OpenAdvisories
High · 7.5 GHSA-w7hm-hmxv-pvhf RUSTSEC-2023-0085

HPACK decoder panics on invalid input

Published Apr 5, 2024 · Updated Apr 11, 2024 · Assigned by GHSA

Description

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.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io hpack <= 0.3.0 — GHSA-w7hm-hmxv-pvhf
crates.io hpack >= 0.0.0-0 — RUSTSEC-2023-0085

References