CVE-2026-27704 Dart SDK and Flutter SDK have Zip slip in Dart Pub package extraction
Attackers can exploit Zip slip in Dart/Flutter SDKs to write files outside the cache directory via malicious packages, requiring an upgrade to patched versions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-27704?
CVE-2026-27704 is a medium-severity path traversal vulnerability in dart-lang flutter, published on 25 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The Dart and Flutter SDKs provide software development kits for the Dart programming language. In versions of the Dart SDK prior to 3.11.0 and the Flutter SDK prior to version 3.41.0, when the pub client (`dart pub` and `flutter pub`) extracts a package in the pub cache, a malicious package archive can have files extracted outside the destination directory in the `PUB_CACHE`. A fix has been landed in commit 26c6985c742593d081f8b58450f463a584a4203a. By normalizing the file path before writing file, the attacker can no longer traverse up via a symlink. This patch is released in Dart 3.11.0 and Flutter 3.41.0.vAll packages on pub.dev have been vetted for this vulnerability. New packages are no longer allowed to contain symlinks. The pub client itself doesn't upload symlinks, but duplicates the linked entry, and has been doing this for years. Those whose dependencies are all from pub.dev, third-party repositories trusted to not contain malicious code, or git dependencies are not affected by this vulnerability.
Weakness: CWE-22
Which versions are affected by CVE-2026-27704?
It affects 2 products.
Products include Dart Dart Software Development Kit, Flutter Flutter.
How do I fix CVE-2026-27704?
No fix has been published for CVE-2026-27704 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-27704 being exploited?
There is no known exploitation of CVE-2026-27704 in the wild and no public exploit code.
Other vulnerabilities in dart-lang flutter
Sources
Also known as GHSA-q739-79rh-vmvp.