CVE-2026-31254
Received Received - Intake
Code Injection in Flash-Attention Training Script

Publication date: 2026-05-11

Last updated on: 2026-05-11

Assigner: MITRE

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-11
Last Modified
2026-05-11
Generated
2026-05-11
AI Q&A
2026-05-11
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Currently, no data is known.
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the flash-attention project's training script as of commit e724e2588cbe754beb97cf7c011b5e7e34119e62. The script registers Python's eval() function as a Hydra configuration resolver named eval. This means that configuration files can use the ${eval:...} syntax to execute arbitrary Python code.

An attacker can exploit this by supplying a malicious configuration file that contains harmful Python code. When the training script runs with this configuration, it will execute the attacker's code, leading to arbitrary code execution.


How can this vulnerability impact me? :

This vulnerability can lead to arbitrary code execution on the system running the flash-attention training script. An attacker who provides a malicious configuration file can execute any Python code, potentially compromising the system, stealing data, modifying files, or disrupting operations.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, avoid using untrusted or malicious configuration files with the flash-attention training script, as these can execute arbitrary Python code via the eval resolver.

Consider removing or disabling the registration of the Python eval() function as a Hydra configuration resolver to prevent execution of arbitrary code through the ${eval:...} syntax.

Ensure that only trusted users have access to modify or provide configuration files used by the training script.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart