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
Share

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

4
Analysis Generated
Jul 24, 2026 - 00:05 vuln.today
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

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 4 pypi packages depend on flash-attn (3 direct, 1 indirect)

Ecosystem-wide dependent count for version 2.8.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.

AnalysisAI

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.

Technical ContextAI

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.

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.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Share

CVE-2026-31253 vulnerability details – vuln.today

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