CVE-2026-31254
Received Received - Intake

Code Injection in Flash-Attention Training Script

Vulnerability report for CVE-2026-31254, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

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-07-11
AI Q&A
2026-05-11
EPSS Evaluated
2026-07-09
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 Quick Actions

Instant insights powered by AI
Executive Summary

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.

Impact Analysis

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.

Mitigation Strategies

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.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-31254. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart