CVE-2024-51502: Loona hpack Loona-hpack Panic Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-7vm6-qwh5-9x44
CVSS 4.3
CWE-755 CWE-754
Published
Advisory Summary

CVE-2024-51502 is a MODERATE (CVSS 4.3) loona-hpack panic vulnerability vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Loona hpack libraries in the crates.io ecosystem. The issue involves loona-hpack panic vulnerability. Remediation is available by upgrading affected packages to version 0.4.3.

CVE-2024-51502 at a Glance

CVE Identifier CVE-2024-51502
GHSA Identifier GHSA-7vm6-qwh5-9x44
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-755: Improper Handling of Exceptional Conditions
Affected Product Loona hpack
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2024-51502

To remediate this vulnerability, upgrade all affected Loona hpack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

loona-hpack fixed: 0.4.3
Upgrade loona-hpack to 0.4.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for loona-hpack

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-51502, inspect your project dependencies for Loona hpack:

inspect dependencies for loona-hpack

Analyze the terminal output to locate any version of Loona hpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Loona hpack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `loona-hpack` suffers from the same vulnerability as the original `hpack` as documented in https://github.com/mlalic/hpack-rs/issues/11 ### Details The original includes a very nice description of the problem, as well as an easy-enough fix for it. ### PoC The original example pretty much still applies: ```rust use loona_hpack::Decoder; pub fn main() { let input = &[0x3f]; let mut decoder = Decoder::new(); let _ = decoder.decode(input); } ``` ### Impact From the original: `All users who try to decode untrusted input using the Decoder are vulnerable to this exploit. A patched version of the crate is available on [crates.io](https://crates.io/crates/hpack-patched) under the name hpack-patched. See [Cargo's documentation on overriding dependencies](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html) for more information.`

CVE-2024-51502 Affected Loona hpack Versions

1 component(s)
Fixed Versions:
0.4.3
Product / Package Ecosystem Affected Versions Fixed Version
loona-hpack
crates.io
< 0.4.3
0.4.3

References

Frequently Asked Questions

What is CVE-2024-51502?
CVE-2024-51502 is a security vulnerability in Loona hpack involving loona-hpack Panic Vulnerability under CWE-755: Improper Handling of Exceptional Conditions.
Which Loona hpack versions are affected?
Affected versions include releases prior to 0.4.3 across affected packages: loona-hpack.
What version fixes CVE-2024-51502?
Upgrading to 0.4.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is loona-hpack affected?
Yes, loona-hpack is affected in releases prior to 0.4.3. Upgrade your dependency to 0.4.3 or later.
What is the CVSS score of CVE-2024-51502?
CVE-2024-51502 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2024-51502?
CVE-2024-51502 is classified under CWE-755: Improper Handling of Exceptional Conditions (The product does not handle or incorrectly handles an exceptional condition.).
How can I check crates.io dependencies for CVE-2024-51502?
Run the dependency tree command: 'inspect dependencies for loona-hpack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7vm6-qwh5-9x44",
  "modified" : "2024-11-05T18:35:38Z",
  "published" : "2024-11-04T23:22:33Z",
  "aliases" : [ "CVE-2024-51502" ],
  "summary" : "loona-hpack Panic Vulnerability",
  "details" : "### Summary\n`loona-hpack` suffers from the same vulnerability as the original `hpack` as documented in https://github.com/mlalic/hpack-rs/issues/11 \n\n### Details\nThe original includes a very nice description of the problem, as well as an easy-enough fix for it.\n\n### PoC\nThe original example pretty much still applies:\n```rust\nuse loona_hpack::Decoder;\n\npub fn main() {\n    let input = &[0x3f];\n    let mut decoder = Decoder::new();\n    let _ = decoder.decode(input);\n}\n```\n\n### Impact\nFrom the original:\n`All users who try to decode untrusted input using the Decoder are vulnerable to this exploit. A patched version of the crate is available on [crates.io](https://crates.io/crates/hpack-patched) under the name hpack-patched. See [Cargo's documentation on overriding dependencies](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html) for more information.`\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "loona-hpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.4.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bearcove/loona/security/advisories/GHSA-7vm6-qwh5-9x44"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-51502"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mlalic/hpack-rs/issues/11"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bearcove/loona/commit/9a4028ec6484f50a320281271a41a5040ddb1ba8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-w7hm-hmxv-pvhf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bearcove/loona"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-754", "CWE-755" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-04T23:22:33Z",
    "nvd_published_at" : "2024-11-04T23:15:05Z"
  }
}