CVE-2025-9301 cmake cmForEachCommand.cxx ReplayItems assertion

Medium 4.8 Published Updated

A local attacker can trigger a reachable assertion in CMake's foreach command processing, causing a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-9301?

CVE-2025-9301 is a medium-severity denial of service vulnerability in cmake, published on 21 Aug 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

A vulnerability was determined in cmake 4.1.20250725-gb5cce23. This affects the function cmForEachFunctionBlocker::ReplayItems of the file cmForEachCommand.cxx. This manipulation causes reachable assertion. The attack needs to be launched locally. The exploit has been publicly disclosed and may be utilized. Patch name: 37e27f71bc356d880c908040cd0cb68fa2c371b8. It is suggested to install a patch to address this issue.

Weakness: CWE-617

Which versions are affected by CVE-2025-9301?

Linux distribution packages (10)
cmake SUSE:Linux Enterprise Module for Basesystem 15 SP6All versions3.28.3-150600.3.3.1
cmake-full SUSE:Linux Enterprise Module for Basesystem 15 SP6All versions3.28.3-150600.3.3.1
cmake SUSE:Linux Enterprise Module for Basesystem 15 SP7All versions3.28.3-150600.3.3.1
cmake-full SUSE:Linux Enterprise Module for Basesystem 15 SP7All versions3.28.3-150600.3.3.1
cmake openSUSE:Leap 15.6All versions3.28.3-150600.3.3.1
cmake-full openSUSE:Leap 15.6All versions3.28.3-150600.3.3.1
cmake-ui openSUSE:Leap 15.6All versions3.28.3-150600.3.3.1
cmake3 openSUSE:Leap 15.6All versions3.20.0-150200.6.6.1
cmake3-full openSUSE:Leap 15.6All versions3.20.0-150200.6.6.1
cmake3-ui openSUSE:Leap 15.6All versions3.17.0-150000.1.9.1

How do I fix CVE-2025-9301?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-9301 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-9301 exists.

Sources

Also known as AZL-66554, AZL-66557, BELL-CVE-2025-9301, DEBIAN-CVE-2025-9301, ECHO-ebd3-697a-ca11, GHSA-mff3-m38v-mgv6 and 11 more.

Is CVE-2025-9301 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free