GHSA-9cc5-2pq7-hfj8: Xmas elf Xmas-elf Potential Out-of-bounds Read With Vulnerability

MODERATE
CWE-125
Published
Advisory Summary

GHSA-9cc5-2pq7-hfj8 is a MODERATE xmas-elf potential out-of-bounds read with vulnerability (CWE-125: Out-of-bounds Read) affecting Xmas elf libraries in the crates.io ecosystem. The issue involves xmas-elf potential out-of-bounds read with a malformed elf file and the hashtable api.. Remediation is available by upgrading affected packages to version 0.10.

GHSA-9cc5-2pq7-hfj8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9cc5-2pq7-hfj8
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Xmas elf
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-9cc5-2pq7-hfj8

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

xmas-elf fixed: 0.10
Upgrade xmas-elf to 0.10
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 xmas-elf

How to Check if You Are Affected

To determine whether your application is affected by GHSA-9cc5-2pq7-hfj8, inspect your project dependencies for Xmas elf:

inspect dependencies for xmas-elf

Analyze the terminal output to locate any version of Xmas elf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10), 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-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Xmas elf, 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

Affected versions of this crate only validated the `index` argument of `HashTable::get_bucket` and `HashTable::get_chain` against the input-controlled `bucket_count` and `chain_count` fields, but not against the size of the ELF section. As a result, a malformed ELF file could trigger out-of-bounds reads in a consumer of the HashTable API by setting these fields to inappropriately large values that would fall outside the relevant hash table section, and by introducing correspondingly out-of-bounds hash table indexes elsewhere in the ELF file.

GHSA-9cc5-2pq7-hfj8 Affected Xmas elf Versions

1 component(s)
Fixed Versions:
0.10
Product / Package Ecosystem Affected Versions Fixed Version
xmas-elf
crates.io
< 0.10
0.10

References

Frequently Asked Questions

What is GHSA-9cc5-2pq7-hfj8?
GHSA-9cc5-2pq7-hfj8 is a security vulnerability in Xmas elf involving xmas-elf potential out-of-bounds read with a malformed ELF file and the HashTable API. under CWE-125: Out-of-bounds Read.
Which Xmas elf versions are affected?
Affected versions include releases prior to 0.10 across affected packages: xmas-elf.
What version fixes GHSA-9cc5-2pq7-hfj8?
Upgrading to 0.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xmas-elf affected?
Yes, xmas-elf is affected in releases prior to 0.10. Upgrade your dependency to 0.10 or later.
What CWE is associated with GHSA-9cc5-2pq7-hfj8?
GHSA-9cc5-2pq7-hfj8 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check crates.io dependencies for GHSA-9cc5-2pq7-hfj8?
Run the dependency tree command: 'inspect dependencies for xmas-elf'. 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-9cc5-2pq7-hfj8",
  "modified" : "2025-03-26T20:11:25Z",
  "published" : "2025-03-26T20:11:24Z",
  "aliases" : [ ],
  "summary" : "xmas-elf potential out-of-bounds read with a malformed ELF file and the HashTable API.",
  "details" : "Affected versions of this crate only validated the `index` argument of `HashTable::get_bucket` and `HashTable::get_chain` against the input-controlled `bucket_count` and `chain_count` fields, but not against the size of the ELF section. As a result, a malformed ELF file could trigger out-of-bounds reads in a consumer of the HashTable API by setting these fields to inappropriately large values that would fall outside the relevant hash table section, and by introducing correspondingly out-of-bounds hash table indexes elsewhere in the ELF file.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "xmas-elf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nrc/xmas-elf/issues/86"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nrc/xmas-elf/commit/57685c35512a57269086314a42a70441af4ef451"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nrc/xmas-elf"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0018.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-26T20:11:24Z",
    "nvd_published_at" : null
  }
}