Skip to main content

flash-attention CVE-2026-31253

| EUVDEUVD-2026-29100 HIGH
Code Injection (CWE-94)
2026-05-11 mitre GHSA-7g5w-pq96-8c5w
7.3
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious pickle checkpoint
  2. Delivery
    Publish to model hub or share with target
  3. Exploit
    Victim calls load_checkpoint()/eval loader
  4. Execution
    torch.load() unpickles payload
  5. Impact
    Arbitrary code executes as victim user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to load an attacker-controlled checkpoint file through the framework's own code paths - specifically load_checkpoint() in checkpoint.py during model warmstarting, or the checkpoint loader in eval.py during evaluation. The concrete prerequisite is that torch.load() is invoked without weights_only=True (the vulnerable default in this code) on a file the attacker can supply, e.g. a poisoned checkpoint obtained from a public model hub, a shared drive, or a compromised mirror. The key limiting factor is that this is NOT truly zero-interaction despite the published UI:N: a human/pipeline must actively choose to load the malicious artifact, so social engineering or trust in the artifact's provenance is the real gate. Exploitation does not require authentication to the victim system and needs no special privileges once the file is loaded, but it is bounded to environments that actually run flash-attention's training/eval scripts against third-party checkpoints.

Impact

The signals conflict and should be read carefully. The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, base 7.3) implies remote, unauthenticated, zero-interaction exploitation, but the description makes clear the victim must actively load an attacker-supplied checkpoint - that is effectively user interaction (UI:R) and a local/file-delivery step, so the published UI:N appears too generous. Conversely the impact metrics (C:L/I:L/A:L) look too low for what is described as arbitrary code execution, which normally warrants High confidentiality/integrity/availability. Corroborating the low practical urgency: EPSS is 0.02% (5th percentile), there is no KEV listing, no POC is referenced, and CISA's SSVC scores Exploitation=none, Automatable=no, Technical Impact=partial. Net assessment: a genuine RCE-class weakness but one gated by social-engineering/trust in the artifact source, so it is a real-but-not-urgent priority - patch on a normal cycle and prioritize higher for teams that ingest third-party checkpoints. Note the discrepancy: CVSS marks UI:N and only partial impact, whereas the described behavior is full code execution requiring a victim action - verify scoring against the vendor.

Exploit ScenarioDerived

An attacker publishes a fine-tuned model checkpoint on a public model hub or shares it with a research team, embedding a malicious pickle payload via a crafted __reduce__ method. A victim runs the framework's warmstart or evaluation flow and calls load_checkpoint() on the file; torch.load() unpickles it and the attacker's code runs with the victim's privileges, enabling credential theft or lateral movement. No public POC is referenced, but exploitation is technically trivial once the file is loaded (AC:L).

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Arbitrary code execution in the Dao-AILab flash-attention training framework (all revisions up to and including commit e724e2588cbe754beb97cf7c011b5e7e34119e62) arises because its checkpoint-loading paths call PyTorch's torch.load() without weights_only=True, permitting pickle-based deserialization of attacker-controlled objects. Any user who warmstarts or evaluates a model from an untrusted checkpoint file triggers code execution on their host. No public exploit is identified at time of analysis, EPSS is negligible (0.02%), and SSVC records exploitation as 'none' - this is a latent supply-chain/ML-artifact risk rather than an actively exploited one.

RemediationAI

Because the CVE identifies a specific commit boundary rather than a fixed release, no vendor-released patched version is independently confirmed at time of analysis - track the flash-attention repository (https://github.com/Dao-AILab/flash-attention) for a commit that adds weights_only=True. The concrete code-level fix is to change both torch.load() call sites - load_checkpoint() in checkpoint.py and the loader in eval.py - to pass weights_only=True (and, where custom classes are legitimately needed, use torch.serialization.add_safe_globals() to allowlist them rather than disabling the guard). As compensating controls until patched: only load checkpoints you produced or that come from a cryptographically verified source, and validate artifact integrity with checksums/signatures before loading (trade-off: operational overhead and breaks convenient hub pulls); load untrusted checkpoints only inside a sandboxed/containerized, network-restricted, non-privileged environment so any executed payload is contained (trade-off: added infra complexity); and prefer safetensors format for weight exchange where feasible (trade-off: does not carry arbitrary Python/optimizer state, so warmstarting workflows may need adjustment). Cite the advisory at https://nvd.nist.gov/vuln/detail/CVE-2026-31253 and EUVD-2026-29100 in change records.

Affected VersionsENISA

n/a n/a

Affected Packages

pypi flash-attn no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The defect is a classic Python insecure-deserialization issue (CWE-502; the NVD header also tags CWE-94, Code Injection). PyTorch's torch.load() defaults to the pickle module, which reconstructs arbitrary Python objects and will invoke __reduce__/__setstate__ handlers embedded in the serialized stream - meaning loading a file is equivalent to executing whatever code its author chose. The security-hardened remedy, weights_only=True (default-safe in newer PyTorch), restricts unpickling to tensors and a small allowlist of safe types. In this framework the unsafe calls live in load_checkpoint() in checkpoint.py and in the checkpoint-loading logic of eval.py, both invoked during model warmstarting and evaluation. Because ML checkpoints are routinely shared via public hubs, mirrors, and collaborators, a poisoned .pt/.ckpt artifact is a realistic delivery vehicle. CPE data is uninformative here (cpe:2.3:a:n/a:n/a) so exact affected packaging must be taken from the GitHub source, not NVD CPE.

Know when Checkpoint gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.3 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
vuln.today AI 8.8 HIGH

Victim must load an attacker-supplied checkpoint (UI:R), no auth needed (PR:N), and successful unpickling yields full code execution, so C/I/A are High.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

Lifecycle Timeline

3
CVSS changed
May 12, 2026 - 20:22 NVD
7.3 (HIGH)
CVE Published
May 11, 2026 - 00:00 nvd
UNKNOWN (no severity yet)
CVE Published
May 11, 2026 - 00:00 nvd
HIGH 7.3

DescriptionCVE.org

The flash-attention training framework thru commit e724e2588cbe754beb97cf7c011b5e7e34119e62 (2025-13-04) contains an insecure deserialization vulnerability (CWE-502) in its checkpoint loading mechanism. The load_checkpoint() function in checkpoint.py and the checkpoint loading code in eval.py use torch.load() without enabling the security-restrictive weights_only=True parameter. This allows the deserialization of arbitrary Python objects via the pickle module. An attacker can exploit this by providing a maliciously crafted checkpoint file. When a victim loads this checkpoint during model warmstarting or evaluation, arbitrary code is executed on the victim's system.

Executive ViewAI

Why It Matters

The flash-attention machine learning framework used by AI/ML teams contains an arbitrary code execution vulnerability in checkpoint loading that could allow attackers to compromise training infrastructure and steal models or training data. While no active exploitation has been identified and this requires processing untrusted checkpoint files, organizations must implement model artifact verification controls to reduce supply-chain risk.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim controls: (1) restrict checkpoint loading to cryptographically-verified sources with documented provenance; (2) implement air-gapped evaluation environments for external model artifacts; (3) isolate ML training infrastructure on network-segmented systems; (4) monitor Dao-AILab repository for patch releases; (5) conduct quarterly audits of checkpoint sources and access logs.

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% exploitable
Prevalence
Low
vulnerable code is repo training/eval scripts, not the core kernel library
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2014-6271 CRITICAL POC
9.8 Sep 24

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which

CVE-2024-24919 HIGH POC
8.6 May 28

Potentially allowing an attacker to read certain information on Check Point Security Gateways once connected to the inte

CVE-2014-7169 CRITICAL POC
9.8 Sep 25

GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of

CVE-2017-1000083 HIGH POC
7.8 Sep 05

backend/comics/comics-document.c (aka the comic book backend) in GNOME Evince before 3.24.1 allows remote attackers to e

CVE-2026-85102 CRITICAL POC
9.8 Sep 09

Remote code execution in Check Point Quantum Security Gateway arises from improper certificate trust validation during V

CVE-2026-16232 CRITICAL POC
9.3 Jul 22

Authentication bypass in the Check Point SmartConsole login process lets an unauthenticated remote attacker mint a valid

CVE-2026-50751 CRITICAL POC
9.3 Jun 08

Authentication bypass in Check Point Quantum Security Gateway and Spark Firewalls allows unauthenticated remote attacker

CVE-2026-93616 CRITICAL POC
9.8 Sep 22

Unauthenticated attackers who can reach the file-upload interface of Check Point Management Server can combine directory

CVE-2021-3449 MEDIUM
5.9 Mar 25

An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med

CVE-2026-85103 CRITICAL POC
9.8 Sep 09

Remote code execution in Check Point Quantum Security Gateway and Quantum Security Management stems from a heap-based bu

CVE-2026-91843 CRITICAL POC
9.8 Sep 16

Unauthenticated remote code execution affects Check Point Quantum Security Management, where a stack-based buffer overfl

CVE-2024-3568 CRITICAL POC
9.6 Apr 10

The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy