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

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.05% (17th 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 ID SNYK-RUST-LOONAHPACK-8342622
  • published 5 Nov 2024
  • disclosed 5 Apr 2024
  • credit Unknown

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
Expand this section

Snyk

Recommended
6.2 medium
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    None
  • Availability (A)
    High