CVE-2026-31253
7.3high
flash-attention contains an insecure deserialization vulnerability in its checkpoint loading mechanism
- Severity
- 7.3high CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.22% (higher than 13% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-7g5w-pq96-8c5wPYSEC-2026-2477
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| flash-attn (PyPI) | up to 2.8.3 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| CISA-ADP | 7.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 7.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| PyPA Advisory Database | 7.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-31253 changed 2026-05-12 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7g5w-pq96-8c5w changed 2026-07-14 | CC-BY-4.0 |
| NVD | CVE-2026-31253 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2477 changed 2026-07-13 | CC-BY-4.0 |