# GHSA-8FC3-XMHG-C8H5: Panics and aborts when reading crafted 7z archives

- Database: GitHub
- Severity: CVSS 4.0 (Medium)
- Published: 2026-10-30
- Modified: 2026-10-30

## Affected versions

- sevenz-rust2 (crates.io): through 0.24.1

## Description

## Summary

`sevenz-rust2` can panic or abort the process when it reads a crafted 7z archive. This can
happen when the archive is opened and when its entries are decoded. An attacker who can supply
an archive to a program that uses this crate can crash that program.

- Crate: `sevenz-rust2`
- Affected versions: all versions up to and including 0.24.1
- Patched version: 0.24.2

## Impact

A program that reads untrusted 7z archives with `sevenz-rust2` can crash on a crafted archive.

All functions that open an archive or decode its entries are affected. This includes the
extraction functions of the `util` feature and the WASM `decompress` function.

## Issues

The advisory covers four groups of issues.

1. **Inconsistent header structure.** The crate accepted archive headers whose parts did not
   fit together. Examples are a header that describes compressed data without a list of files,
   a compression block without packed data, and a coder without exactly one output stream.
   Decoding such an archive panicked.

2. **Unbounded coder graphs.** The crate accepted compression blocks with very long chains of
   coders and blocks that use a stream more than once. Decoding such a block could overflow the
   stack or exhaust memory.

3. **Memory allocation from header values.** The crate allocated memory for counts and sizes
   from the archive header with allocations that abort or panic when they fail. A crafted
   header could declare counts that exceed the address space or the available memory. Some
   error paths also allocated memory after an allocation had failed.

4. **Platform-specific panics.** The WASM `decompress` function panicked when an archive
   pointed past the end of its data. On Windows, the extraction functions of the `util` feature
   panicked on a file time outside the range of the platform's `SystemTime`.

The patched version rejects such archives with an error. It returns an error when an
allocation for header data fails, and it leaves file times unset when the platform cannot hold
them.

## Mitigation

Update `sevenz-rust2` to 0.24.2 or later.

## References

- https://github.com/hasenbanck/sevenz-rust2/security/advisories/GHSA-8fc3-xmhg-c8h5

Page: https://cve.now/GHSA-8FC3-XMHG-C8H5

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
