CVE-2026-27704: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in dart-lang sdk
CVE-2026-27704 is a path traversal vulnerability in Dart and Flutter SDKs prior to versions 3. 11. 0 and 3. 41. 0 respectively. It affects the pub client when extracting package archives into the pub cache, allowing malicious packages to write files outside the intended directory by exploiting symlink traversal. The issue is fixed by normalizing file paths before extraction, preventing directory escape via symlinks. This vulnerability has a CVSS score of 6. 6 (medium severity) and requires no authentication or user interaction to exploit. Packages hosted on pub.
AI Analysis
Technical Summary
CVE-2026-27704 is a path traversal vulnerability classified under CWE-22 affecting the Dart and Flutter SDKs' package manager (pub client) prior to Dart 3.11.0 and Flutter 3.41.0. The vulnerability arises during the extraction of package archives into the PUB_CACHE directory. Maliciously crafted package archives containing symlinks can cause files to be extracted outside the intended directory by traversing up the directory tree, potentially overwriting arbitrary files on the host system. This occurs because the extraction process did not properly normalize file paths before writing, allowing directory traversal via symlink resolution. The vulnerability is mitigated by a patch that normalizes file paths before extraction, effectively preventing symlink-based traversal attacks. The pub client itself does not upload symlinks but duplicates linked entries, and pub.dev has enforced policies disallowing symlinks in new packages. Users relying solely on vetted packages from pub.dev or trusted git repositories are not affected. The vulnerability has a CVSS 4.0 score of 6.6, reflecting medium severity with network attack vector, no privileges or user interaction required, and high impact on confidentiality due to potential arbitrary file writes. No exploits have been observed in the wild to date.
Potential Impact
The primary impact of this vulnerability is the potential for an attacker to write or overwrite arbitrary files on a victim's system by publishing a malicious package that exploits the path traversal during extraction. This can lead to unauthorized modification of system or application files, potentially enabling code execution, privilege escalation, or persistent backdoors if critical files are overwritten. Organizations using vulnerable versions of the Dart or Flutter SDKs and incorporating untrusted or third-party packages outside of vetted repositories are at risk. The impact is mitigated for users relying exclusively on pub.dev packages due to vetting and symlink restrictions. However, development environments, CI/CD pipelines, or build servers that automatically fetch and extract packages from untrusted sources could be compromised. This could affect software supply chain integrity and trustworthiness, leading to broader security incidents if malicious code is introduced into production builds or developer machines.
Mitigation Recommendations
To mitigate this vulnerability, organizations should upgrade to Dart SDK version 3.11.0 or later and Flutter SDK version 3.41.0 or later, where the path normalization fix is implemented. Avoid using packages from untrusted third-party repositories or sources that may contain malicious archives with symlinks. Enforce strict policies to only allow dependencies from pub.dev or trusted git repositories that do not contain symlinks. Implement file system monitoring on build and development machines to detect unexpected file writes outside designated package cache directories. Consider sandboxing or isolating build environments to limit the impact of any arbitrary file writes. Regularly audit and verify package integrity and provenance before inclusion in projects. Educate developers about the risks of using unvetted packages and the importance of SDK updates. Finally, monitor security advisories from Dart and Flutter projects for any further updates or related vulnerabilities.
Affected Countries
United States, Germany, India, China, United Kingdom, Canada, Australia, France, Japan, South Korea
CVE-2026-27704: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in dart-lang sdk
Description
CVE-2026-27704 is a path traversal vulnerability in Dart and Flutter SDKs prior to versions 3. 11. 0 and 3. 41. 0 respectively. It affects the pub client when extracting package archives into the pub cache, allowing malicious packages to write files outside the intended directory by exploiting symlink traversal. The issue is fixed by normalizing file paths before extraction, preventing directory escape via symlinks. This vulnerability has a CVSS score of 6. 6 (medium severity) and requires no authentication or user interaction to exploit. Packages hosted on pub.
AI-Powered Analysis
Technical Analysis
CVE-2026-27704 is a path traversal vulnerability classified under CWE-22 affecting the Dart and Flutter SDKs' package manager (pub client) prior to Dart 3.11.0 and Flutter 3.41.0. The vulnerability arises during the extraction of package archives into the PUB_CACHE directory. Maliciously crafted package archives containing symlinks can cause files to be extracted outside the intended directory by traversing up the directory tree, potentially overwriting arbitrary files on the host system. This occurs because the extraction process did not properly normalize file paths before writing, allowing directory traversal via symlink resolution. The vulnerability is mitigated by a patch that normalizes file paths before extraction, effectively preventing symlink-based traversal attacks. The pub client itself does not upload symlinks but duplicates linked entries, and pub.dev has enforced policies disallowing symlinks in new packages. Users relying solely on vetted packages from pub.dev or trusted git repositories are not affected. The vulnerability has a CVSS 4.0 score of 6.6, reflecting medium severity with network attack vector, no privileges or user interaction required, and high impact on confidentiality due to potential arbitrary file writes. No exploits have been observed in the wild to date.
Potential Impact
The primary impact of this vulnerability is the potential for an attacker to write or overwrite arbitrary files on a victim's system by publishing a malicious package that exploits the path traversal during extraction. This can lead to unauthorized modification of system or application files, potentially enabling code execution, privilege escalation, or persistent backdoors if critical files are overwritten. Organizations using vulnerable versions of the Dart or Flutter SDKs and incorporating untrusted or third-party packages outside of vetted repositories are at risk. The impact is mitigated for users relying exclusively on pub.dev packages due to vetting and symlink restrictions. However, development environments, CI/CD pipelines, or build servers that automatically fetch and extract packages from untrusted sources could be compromised. This could affect software supply chain integrity and trustworthiness, leading to broader security incidents if malicious code is introduced into production builds or developer machines.
Mitigation Recommendations
To mitigate this vulnerability, organizations should upgrade to Dart SDK version 3.11.0 or later and Flutter SDK version 3.41.0 or later, where the path normalization fix is implemented. Avoid using packages from untrusted third-party repositories or sources that may contain malicious archives with symlinks. Enforce strict policies to only allow dependencies from pub.dev or trusted git repositories that do not contain symlinks. Implement file system monitoring on build and development machines to detect unexpected file writes outside designated package cache directories. Consider sandboxing or isolating build environments to limit the impact of any arbitrary file writes. Regularly audit and verify package integrity and provenance before inclusion in projects. Educate developers about the risks of using unvetted packages and the importance of SDK updates. Finally, monitor security advisories from Dart and Flutter projects for any further updates or related vulnerabilities.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-23T17:56:51.202Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 699f183fb7ef31ef0b2eb1cd
Added to database: 2/25/2026, 3:41:51 PM
Last enriched: 2/25/2026, 3:57:42 PM
Last updated: 2/25/2026, 7:14:45 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
Google Disrupts Chinese Cyberespionage Campaign Targeting Telecoms, Governments
MediumCVE-2026-3206: CWE-404 Improper Resource Shutdown or Release in KrakenD KrakenD-CE
LowCVE-2026-27848: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Linksys MR9600
CriticalCVE-2026-27847: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in Linksys MR9600
HighCVE-2026-27846: CWE-306 Missing Authentication for Critical Function in Linksys MR9600
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.