CVE-2024-51736: Command execution hijack on Windows with Process class in symfony/process
Description
On Windows, when an executable file named cmd.exe is located in the current working directory it will be called by the Process class when preparing command arguments, leading to possible hijacking.
Resolution
The Process class now uses the absolute path to cmd.exe.
The patch for this issue is available here for branch 5.4.
Credits
We would like to thank Jordi Boggiano for reporting the issue and Nicolas Grekas for providing the fix.
Other sources
Symphony process is a module for the Symphony PHP framework which executes commands in sub-processes. On Windows, when an executable file named cmd.exe is located in the current working directory it will be called by the Process class when preparing command arguments, leading to possible hijacking. This issue has been addressed in release versions 5.4.46, 6.4.14, and 7.1.7. Users are advised to upgrade. There are no known workarounds for this vulnerability.
— NVD
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2024-51736?
CVE-2024-51736 is considered a moderate severity vulnerability due to its potential for command execution hijacking.
How do I fix CVE-2024-51736?
To fix CVE-2024-51736, upgrade to Symfony version 7.1.7, 6.4.14, or 5.4.46.
What are the affected versions for CVE-2024-51736?
CVE-2024-51736 affects Symfony versions prior to 7.1.7, 6.4.14, and 5.4.46.
What is the nature of the vulnerability in CVE-2024-51736?
CVE-2024-51736 allows a hijack of command execution when cmd.exe is present in the current working directory.
Which packages are impacted by CVE-2024-51736?
The impacted packages are symfony/symfony and symfony/process versions below the specified remediation versions.