Symfony's incorrect argument escaping under MSYS2/Git Bash can lead to destructive file operations on Windows
CVE-2026-24739 · GHSA-r39x-jcww-82v6
- Affected
- Packagist symfony/process < 5.4.51; >= 6.4, < 6.4.33; >= 7.3, < 7.3.11; >= 7.4, < 7.4.5; >= 8.0, < 8.0.5
- Fixed in
- 7.4.56.4.337.3.118.0.55.4.51· Vendor fix available
- Issue
- The Symfony Process component did not correctly treat some characters (notably =) as “special” when escaping arguments on Windows. When PHP is executed from an MSYS2-based environment (e.g. Git Bash) and Symfony Process spawns native Windows executables, MSYS2’s argument/path conversion can mishandle unquoted arguments containing these characters. This can cause the spawned process to receive corrupted/truncated arguments compared to what Symfony intended. Impact If an application (or tooling such as Composer scripts) uses Symfony Process to invoke file-management commands (e.g. rmdir, del, etc.) with a path argument containing =, the MSYS2 conversion layer may alter the argument at runtime. In affected setups this can result in operations being performed on an unintended path, up to and including deletion of the contents of a broader directory or drive. The issue is particularly relevant when untrusted input can influence process arguments (directly or indirectly, e.g. via…
Recommended action: Upgrade to 8.0.5, 7.4.5, 7.3.11 or 2 more by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.