7.5high
HPACK decoder panics on invalid input
- Severity
- 7.5high CVSS:3.1 by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2023-0085
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:
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.
Also consider using fluke-hpack or httlib-huffman as an alternative.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| hpack (crates.io) | up to 0.3.0, from 0.0.0-0 | GitHub Advisory Database, RustSec Advisory Database |
Classification
What each source says
GitHub Advisory Database
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:
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.
Also consider using fluke-hpack or httlib-huffman as an alternative.
RustSec Advisory Database
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:
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.
Also consider using loona-hpack or httlib-huffman as an alternative.
Version 0.3.1 of fluke-hpack still reproduces the panic described in this advisory.
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-w7hm-hmxv-pvhf changed 2024-04-11 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2023-0085 changed 2026-07-22 | CC0-1.0 |