GHSA-w7hm-hmxv-pvhf
JSON

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 packageVersionsReported by
hpack (crates.io)up to 0.3.0, from 0.0.0-0GitHub 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

SourceRecordLicence
GitHub Advisory DatabaseGHSA-w7hm-hmxv-pvhf changed 2024-04-11CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2023-0085 changed 2026-07-22CC0-1.0