GHSA-w7hm-hmxv-pvhf

Suggest an improvement
Source
https://github.com/advisories/GHSA-w7hm-hmxv-pvhf
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/04/GHSA-w7hm-hmxv-pvhf/GHSA-w7hm-hmxv-pvhf.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-w7hm-hmxv-pvhf
Aliases
Published
2024-04-05T15:06:27Z
Modified
2024-04-11T16:41:43.815805Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
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.

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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-754"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2024-04-05T15:06:27Z"
}
References

Affected packages

crates.io / hpack

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Last affected
0.3.0