# CVE-2026-31253: flash-attention contains an insecure deserialization vulnerability in its checkpoint loading mechanism

- Severity: High 7.3 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2026-05-11T00:00:00.000Z
- Modified: 2026-07-14T05:30:20.366Z
- Also known as: GHSA-7g5w-pq96-8c5w, PYSEC-2026-2477
- Weaknesses: CWE-94, CWE-502
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- flash-attn (PyPI): up to 2.8.3

## Every score

- CISA-ADP: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- PyPA Advisory Database: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`

## 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)

## Sources

- CVE List: [CVE-2026-31253](https://www.cve.org/CVERecord?id=CVE-2026-31253), CVE Terms of Use, modified 2026-05-12
- GitHub Advisory Database: [GHSA-7g5w-pq96-8c5w](https://github.com/advisories/GHSA-7g5w-pq96-8c5w), CC-BY-4.0, modified 2026-07-14
- NVD: [CVE-2026-31253](https://nvd.nist.gov/vuln/detail/CVE-2026-31253), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2477](https://osv.dev/vulnerability/PYSEC-2026-2477), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-31253 · Whole record: https://cve.day/CVE-2026-31253.json · Rebuilt by cve.day 2026-11-25T22:59:21.212Z
