CVE-2026-31254: flash-attention - Code Injection
- Cve: CVE-2026-31254
- Name: flash-attention - Code Injection
- 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.
- Impact: Attackers can execute arbitrary Python code remotely, leading to full system compromise during training script execution.
- Remediation: Update to a version that removes or restricts use of eval() in configuration resolvers or apply patches that disable arbitrary code execution via config files.
- Vulnerability type: code_injection
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.3
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Epss score: 0.00247
- Epss percentile: 0.15891
- Assignee: [email protected]
- Published at: 2026-05-11T17:16:20Z
- Age in days: 197
- Modified at: 2026-06-17T10:33:32Z
- References total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-31254
- Nvd status: deferred
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, oss, projects total, projects, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-95 | Improper Neutralization of Directives in Dynamically Evaluated Code |
References
| Url | Source | Tags |
|---|---|---|
| https://www.notion.so/CVE-2026-31254-35d1e139318881a19003f0d635ff00df | nvd |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts