Skip to main content
← Vulnerabilities

Unbounded memory allocation in `evtx` parsing a `.wevtcache` file

Affects evtx 0.11.0 through 0.14.0 when parsing untrusted .wevtcache files via the wevt_templates feature, enabled by default. Fixed in 0.15.1.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

Exploited
No known exploitation
Fix
Fixed in 0.15.1
Who is exposed
Specific setups only

Do first: Check whether your setup matches what the bug needs. The code is in the wevt_templates feature, which is enabled by default through the evtx_dump feature. Affected evtx versions 0.11.0 through 0.14.0 (published versions). Untrusted .wevtcache file is parsed through the public for_each_crim_blob API or WevtCacheReader::next_entry.

Published
Last modified
15/100
Specific setups only
None on Exploit-DB, Metasploit or GitHub

Summary

The `evtx` library's parser for Windows `.wevtcache` files can be made to allocate a huge amount of memory from a very small crafted file, which aborts the program. This lets an attacker cause a denial of service in any application that reads untrusted `.wevtcache` files with it.

Read the original 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:

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.

cve.now Index

15cve.now Index 15 of 100 · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure5/25Specific setups only
  • Reach10/20Affects crates.io packages
  • Severity?/10Unknown. No CVSS score or vendor rating
  • No patch0/5No signal

What would change the score

  • Would score about 65 if added to CISA KEV
  • Would score about 60 if CISA's SSVC rates exploitation active
  • Would score about 25 if CISA's SSVC rates it automatable

What to do

  • Check whether your setup matches what the bug needs.

    The code is in the wevt_templates feature, which is enabled by default through the evtx_dump feature. Affected evtx versions 0.11.0 through 0.14.0 (published versions). Untrusted .wevtcache file is parsed through the public for_each_crim_blob API or WevtCacheReader::next_entry.
  • Upgrade to a fixed version: 0.15.1.

Timeline

  1. Advisory published1 day
  2. Record last updated
  3. First seen by cve.now

Affected versions

  • evtxcrates.io

    From 0.11.0 · fixed in 0.15.1

Evidence 4

  1. Advisory
  2. Report
  3. Repository
  4. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about RUSTSEC-2026-0431

Is RUSTSEC-2026-0431 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

A tiny crafted .wevtcache file can make the evtx parser request a multi-gigabyte memory allocation. The process then aborts, which is an out-of-memory denial of service.Source: rustsec.org

Which versions are affected by RUSTSEC-2026-0431?

evtx (crates.io): from 0.11.0 before 0.15.1.Source: cve.now feed data

Am I affected, and how do I check?

Published evtx versions 0.11.0 through 0.14.0 are affected. The code is in the wevt_templates feature, which is on by default through the evtx_dump feature, so check whether your build enables it and whether it parses .wevtcache files through for_each_crim_blob or WevtCacheReader::next_entry.Source: rustsec.org

How do I fix RUSTSEC-2026-0431?

Upgrade evtx to 0.15.1 or later, which contains the fix. No workaround is listed in the facts.Source: rustsec.org