{"id":"CVE-2026-31253","aliases":["CVE-2026-31253","GHSA-7g5w-pq96-8c5w","PYSEC-2026-2477"],"related":[],"kind":"vulnerability","state":"published","title":"flash-attention contains an insecure deserialization vulnerability in its checkpoint loading mechanism","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-05-11T00:00:00.000Z","modified":"2026-07-14T05:30:20.366Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"}],"cwes":["CWE-94","CWE-502"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.8.3"}],"ecosystem":"PyPI","package":"flash-attn","purl":"pkg:pypi/flash-attn","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.8.3"}],"ecosystem":"PyPI","package":"flash-attn","purl":"pkg:pypi/flash-attn","source":"pysec"}],"references":[{"url":"https://github.com/Dao-AILab/flash-attention","tags":["package"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.notion.so/CVE-2026-31253-35d1e1393188813f9e77e2038104bc49","tags":["web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31253","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/flash-attn","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-7g5w-pq96-8c5w","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-12T19:32:06.944Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31253","url":"https://www.cve.org/CVERecord?id=CVE-2026-31253","licence":"CVE Terms of Use","modified":"2026-05-12T19:32:41.020Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7g5w-pq96-8c5w","url":"https://github.com/advisories/GHSA-7g5w-pq96-8c5w","licence":"CC-BY-4.0","modified":"2026-07-14T05:30:20.366Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31253","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31253","licence":"Public domain","modified":"2026-06-17T10:33:32.820Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2477","url":"https://osv.dev/vulnerability/PYSEC-2026-2477","licence":"CC-BY-4.0","modified":"2026-07-13T16:31:40.152Z"}],"updatedAt":"2026-11-25T22:59:21.212Z","epss":{"score":0.00218,"percentile":0.13083,"date":"2026-12-01T12:00:22.000Z"}}