Skip to main content

FlashAttention CVE-2026-62239

MEDIUM
Improper Link Resolution Before File Access (CWE-59)
2026-07-13 VulnCheck
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain low-privilege local access to shared build system
  2. Delivery
    Identify predictable FlashAttention cache directory
  3. Exploit
    Pre-plant symlink redirecting extraction path to sensitive location
  4. Execution
    Victim initiates FlashAttention Hopper build
  5. Persist
    download_and_copy() calls extractall() through planted symlink
  6. Impact
    Extracted NVIDIA toolchain files written to attacker-chosen path with victim privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
Exploitation Conditions

Exploitation requires two specific conditions: (1) the attacker must have local write access to the flashattn_cache_path directory - the predictable cache location used by FlashAttention's hopper/setup.py - in order to pre-plant a symlink before the build runs; and (2) a victim user with higher or more sensitive filesystem privileges must subsequently trigger a FlashAttention build or installation that invokes download_and_copy() for NVIDIA Hopper GPU support. The CVSS 4.0 AT:P metric confirms the required precondition of a pre-planted symlink. PR:L confirms low-privilege local access suffices for the attacker role. UI:P confirms the victim must passively initiate the build. Exploitation is limited to: multi-user systems or shared CI/CD environments where the cache directory is writable by non-build users; builds specifically targeting NVIDIA Hopper GPU support via hopper/setup.py; and scenarios where the victim's build process runs with privileges worth targeting. Single-user developer machines where only one account writes to the cache path are not meaningfully at risk.

Impact

The CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N) accurately characterizes this as a local, low-privilege attack constrained by two conditions: AT:P (the attacker must successfully pre-plant a symlink before the build runs) and UI:P (a victim must passively initiate the build). These preconditions meaningfully limit the exploitable population to shared build servers, CI/CD pipelines, or multi-user development machines where unprivileged users can write to the FlashAttention cache directory. On single-user developer workstations where only one account writes to the cache, exploitation is largely theoretical. The high VC and VI scores reflect that, once conditions are met, an attacker can overwrite or read arbitrary files accessible to the build user - which in CI/CD environments is often a service account with broad filesystem access. EPSS data was not provided in source intelligence, but the local-only vector and required preconditions suggest targeted rather than opportunistic exploitation. No KEV listing exists, reducing urgency in most environments. The publicly available POC at GitHub issue #2637 lowers the bar for exploitation in at-risk deployment scenarios. No CVSS score conflict or missing-signal ambiguity to flag.

Exploit ScenarioDerived

On a shared GPU build server, a low-privileged attacker identifies the predictable FlashAttention cache directory and places a symlink at the expected extraction subdirectory path, redirecting it to a sensitive writable location such as a cron directory or an authorized SSH key file. When a developer or CI/CD job subsequently runs a FlashAttention build targeting NVIDIA Hopper GPUs, download_and_copy() extracts the NVIDIA toolchain archive through the attacker's symlink, writing extracted binaries to the redirected path with the victim's privileges. A publicly available POC demonstrating this technique exists at https://github.com/Dao-AILab/flash-attention/issues/2637.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 13, 2026

Arbitrary file write via symlink attack in FlashAttention's build toolchain (through 2.8.3.post1) allows a local low-privileged attacker to redirect NVIDIA archive extraction to attacker-controlled paths by pre-planting a symlink in the predictable cache directory before a victim initiates a build. The hopper/setup.py download_and_copy() function called tarfile.extractall() without symlink validation or path confinement, meaning extracted NVIDIA toolchain binaries could be written anywhere accessible to the victim's process. No active exploitation is confirmed in CISA KEV, but a publicly available proof-of-concept exists at GitHub issue #2637 and a vendor patch is available in commit 0816ef1.

RemediationAI

The primary fix is to update FlashAttention to a version incorporating upstream commit 0816ef12f424c6ec94b057a72c275b14f6e6edb2 (pull request #2702: https://github.com/Dao-AILab/flash-attention/pull/2702); a tagged release version incorporating this fix was not independently confirmed from available data, so verify the specific release against the commit. If immediate upgrade is not possible, restrict write permissions on the flashattn_cache_path directory to the build user only, eliminating the ability of other local users to pre-plant symlinks - this is an effective compensating control with no functional side effects for single-build-user environments. In shared CI/CD environments, running builds in isolated containers or ephemeral user contexts removes the local write-access precondition entirely. Disabling the hopper/setup.py NVIDIA toolchain download path would break Hopper GPU support and is not recommended as a mitigation unless that hardware is not in use.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

FlashAttention (cpe:2.3:a:dao-ailab:flash-attention:*:*:*:*:*:*:*:*) is a GPU-accelerated attention kernel library widely used in transformer-based deep learning workloads targeting NVIDIA GPUs, including the Hopper architecture. The vulnerable code in hopper/setup.py invokes Python's tarfile.extractall() to unpack NVIDIA toolchain archives (e.g., CUDA-related tarballs) into a predictable cache path (flashattn_cache_path) during build or install. CWE-59 (Improper Link Resolution Before File Access - Link Following) is the root cause: the code resolved neither the destination directory nor individual tar members against real filesystem paths before extraction, making it susceptible to both a pre-planted directory-level symlink (redirecting the entire extraction target) and malicious in-archive symlinks (redirecting individual file writes). The fix in PR #2702 adds a safe_extractall() wrapper that uses Python 3.12+'s PEP 706 tarfile data filter where available, and on older interpreters manually validates each member's os.path.realpath() against the intended destination. It also adds a pre-extraction guard that aborts if the resolved cache path escapes the cache root or is itself a symlink.

Know when Flash Attention gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 6.6 MEDIUM

Local attack (AV:L) requiring low-privilege write access to cache dir (PR:L) and victim-initiated build (UI:R); high C and I for arbitrary file read/write; no availability impact.

3.1 AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
4.0 AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

FlashAttention through 2.8.3.post1, fixed in commit 0816ef1, contains a symlink attack vulnerability in the download_and_copy() function within hopper/setup.py that extracts NVIDIA toolchain archives without validating symlinks or filtering tar members. A local attacker can pre-plant a symlink in the predictable cache directory to redirect extracted binaries to an attacker-chosen location, enabling arbitrary file write with victim privileges during build time.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
popular GPU attention library in AI/ML training and inference workflows
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

cpe:2.3:a:dao-ailab:flash-attention:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy