MEDIUM · CVSS 3.1 5.5

RUSTSEC-2026-0431: Unbounded memory allocation in `evtx` parsing a `.wevtcache` file

Published 2026-11-01 · Updated 2026-11-02

Summary

An unbounded memory allocation vulnerability exists in the `evtx` crate when parsing `.wevtcache` files due to insufficient validation of entry payload lengths read from the file. Engineering teams using affected versions should update to the patched release.

Who is affected

Deployments parsing untrusted `.wevtcache` files using the `wevt_templates` feature (enabled by default through `evtx_dump`) are vulnerable. A specially crafted, tiny file can cause a multi-gigabyte memory allocation request, leading to an out-of-memory process abort and denial of service.

Exploitability

The vulnerability requires local access and user interaction to parse a malicious file, resulting in high impact to availability with no direct confidentiality or integrity breach. EPSS is not yet available, and CISA KEV status is no.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
crates.io evtx >= 0.11.0, < 0.15.1 0.15.1 cargo update -p evtx --precise 0.15.1

CVSS 3.1 vector

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Attack vectorLocal
Attack complexityLow
Privileges requiredNone
User interactionRequired
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityHigh

FAQ

Which versions of the `evtx` crate are affected?

Every published version from 0.11.0 through 0.14.0 is affected.

Is the vulnerable code enabled by default?

Yes, the code lives in the `wevt_templates` feature, which is enabled by default through the `evtx_dump` feature.

What is the security impact of this vulnerability?

It causes an out-of-memory denial of service by forcing the process to attempt a multi-gigabyte allocation based on a tiny crafted file.

Original advisory description
Affected versions of `evtx` did not bound a per-entry payload length read from a `.wevtcache` file before allocating a buffer sized from it, allowing a tiny crafted file to force a multi-gigabyte allocation and abort the process (out-of-memory denial of service, CWE-400). ## Details In `WevtCacheReader::next_entry` (`src/wevt_templates/wevtcache.rs`), the per-entry payload length is read as a `u64` straight from the file and used to size a zeroing buffer **before** any data is read: ```rust let len = usize::try_from(len_u64)?; // u64 taken directly from the entry header let mut buf = vec![0u8; len]; // unbounded allocation, sized from the file reader.read_exact(&mut buf)?; // only fails AFTER the allocation ``` The only check on `len` is that it fits in `usize`; there is no check that it fits within the bytes remaining in the file. An entry header declaring a ~4 GiB length therefore makes the crate request a ~4 GiB allocation from a file of only ~25 bytes. The sink is reachable through the public API `evtx::wevt_templates::wevtcache::for_each_crim_blob(path, f)` (and the `WevtCacheReader::next_entry` it drives). The `.wevtcache` reader first shipped in `0.11.0`, and every published version from `0.11.0` through `0.14.0` is affected. The code lives in the `wevt_templates` feature, which is enabled by default through the `evtx_dump` feature. The fix landed in `0.15.1`: `0.15.0` was tagged but never published to crates.io (its Windows build failed), so `0.15.1` is the first patched release available. The Python bindings (`evtx` on PyPI) carry the fix as of `0.15.0`. ## Reproduction A ~25-byte file is sufficient: the `.wevtcache` magic (`WEVTCACH`), a `version` (u32 LE) of `1`, an `entry_count` (u32 LE) of `1`, then one entry consisting of a `kind` byte and a `len` (u64 LE) set to a large value (e.g. `0xFFFFFFF0`), with no payload bytes following. Passing that file to `for_each_crim_blob` triggers the oversized allocation before the short read fails.

References

Source records: RUSTSEC-2026-0431 (OSV.dev).