{"id":"CVE-2026-31253","aliases":["GHSA-7g5w-pq96-8c5w","PYSEC-2026-2477"],"title":"flash-attention contains an insecure deserialization vulnerability in its checkpoint loading mechanism","summary":"flash-attention contains an insecure deserialization vulnerability in its checkpoint loading mechanism","severity":"high","cvss":7.3,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","vendor":"flash-attn","product":"flash-attn","ecosystem":"pip","affected":["flash-attn <= 2.8.3"],"published":"2026-05-11","updated":"2026-07-13","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-7g5w-pq96-8c5w","references":[{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31253"},{"url":"https://github.com/Dao-AILab/flash-attention"},{"url":"https://www.notion.so/CVE-2026-31253-35d1e1393188813f9e77e2038104bc49"}],"tags":["osv","pip"],"epss":0.00218,"epssPercentile":0.12542,"ingestedAt":"2026-07-13T18:57:54.333Z","slug":"CVE-2026-31253","body":"## Overview\n\nThe 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.\n\n## Affected packages\n\n- `flash-attn <= 2.8.3`\n\n## Remediation\n\nRefer to the advisory for the patched release.","depth":"twilight","depthScore":40,"depthScoreParts":{"impact":40.2,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}