CVE-2026-31254 Code injection in n/a

High 7.3 Published Updated

Attackers can execute arbitrary Python code by providing a malicious configuration file to the flash-attention training script.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-31254?

CVE-2026-31254 is a high-severity code injection vulnerability in n/a, published on 11 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The flash-attention project thru commit e724e2588cbe754beb97cf7c011b5e7e34119e62 (2025-13-04) contains a code injection vulnerability (CWE-94) in its training script. The script registers the Python eval() function as a Hydra configuration resolver under the name eval. This allows configuration files to execute arbitrary Python code via the ${eval:...} syntax. An attacker can exploit this by providing a malicious configuration file, leading to arbitrary code execution when the training script is run with that configuration.

Weakness: CWE-95

Which versions are affected by CVE-2026-31254?

How do I fix CVE-2026-31254?

No fix has been published for CVE-2026-31254 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-31254 being exploited?

There is no known exploitation of CVE-2026-31254 in the wild and no public exploit code.

Sources

Also known as GHSA-9hgr-qwgw-x8pp.

Is CVE-2026-31254 in your software?

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

Check your SBOMs for free