# GHSA-9cc5-2pq7-hfj8: xmas-elf potential out-of-bounds read with a malformed ELF file and the HashTable API.

- Severity: Medium (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-03-26T12:00:00.000Z
- Modified: 2026-09-10T03:50:23.078Z
- Also known as: RUSTSEC-2025-0018
- Weaknesses: CWE-125

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- xmas-elf (crates.io): before 0.10; from 0.0.0-0 before 0.10.0

## References

- <https://github.com/nrc/xmas-elf/issues/86> (report, web)
- <https://github.com/nrc/xmas-elf/commit/57685c35512a57269086314a42a70441af4ef451> (web)
- <https://github.com/nrc/xmas-elf> (package)
- <https://rustsec.org/advisories/RUSTSEC-2025-0018.html> (advisory, web)
- <https://crates.io/crates/xmas-elf> (package)

## Sources

- GitHub Advisory Database: [GHSA-9cc5-2pq7-hfj8](https://github.com/advisories/GHSA-9cc5-2pq7-hfj8), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2025-0018](https://rustsec.org/advisories/RUSTSEC-2025-0018.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-9cc5-2pq7-hfj8 · Whole record: https://cve.day/GHSA-9cc5-2pq7-hfj8.json · Rebuilt by cve.day 2026-11-25T22:56:43.249Z
