CVE-2026-31253
HIGH 7.3CVSS 3.1flash-attention contains an insecure deserialization vulnerability in its checkpoint loading mechanism
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.
- Published
- 11 May 2026
- Last modified
- 14 Jul 2026
- Assigned by
- cve@mitre.org
- NVD status
- Deferred
- Weakness
- CWE-502CWE-94
- Also known as
- GHSA-7g5w-pq96-8c5wPYSEC-2026-2477
- Sources
- NVDJSONOSV GHSA-7g5w-pq96-8c5wJSONOSV PYSEC-2026-2477JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | PyPA | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | flash-attn | <= 2.8.3 |
References
- https://github.com/Dao-AILab/flash-attention · PACKAGE
- https://www.notion.so/CVE-2026-31253-35d1e1393188813f9e77e2038104bc49 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-31253 · ADVISORY
- https://pypi.org/project/flash-attn · PACKAGE
- https://github.com/advisories/GHSA-7g5w-pq96-8c5w · ADVISORY
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 11 May 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 11 May 2026)