Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. flash_attn
  4. ›
  5. CVE-2026-31253

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

May 11, 2026 (updated June 30, 2026)

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.

References

  • github.com/Dao-AILab/flash-attention
  • github.com/advisories/GHSA-7g5w-pq96-8c5w
  • nvd.nist.gov/vuln/detail/CVE-2026-31253
  • www.notion.so/CVE-2026-31253-35d1e1393188813f9e77e2038104bc49

Code Behaviors & Features

Detect and mitigate CVE-2026-31253 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 2.8.3

Solution

Unfortunately, there is no solution available yet.

Impact 7.3 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/flash_attn/CVE-2026-31253.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:42 +0000.