The vulnerability lies in the preparePathInfo method of the Symfony\Component\HttpFoundation\Request class. The provided patch directly modifies this function to fix the issue. The vulnerability description states that the Request class improperly interprets PATH_INFO, leading to URLs with paths that don't start with a /. The patch addresses this by adding a check to ensure the path always starts with a /. The modified code snippet if (false === $pathInfo || '' === $pathInfo || '/' !== $pathInfo[0]) { return '/'.$pathInfo; } clearly shows the fix. Therefore, the preparePathInfo function is the vulnerable function as it's responsible for processing the request's path information, and its incorrect handling leads to the authorization bypass.
Symfony\Component\HttpFoundation\Request::preparePathInfosrc/Symfony/Component/HttpFoundation/Request.php
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| symfony/http-foundation | composer | < 5.4.50 | 5.4.50 |
| symfony/http-foundation | composer | >= 6.0.0, < 6.4.29 | 6.4.29 |
| symfony/http-foundation |
| composer |
| >= 7.0.0, < 7.3.7 |
| 7.3.7 |
| symfony/symfony | composer | >= 2.0.0, < 5.4.50 | 5.4.50 |
| symfony/symfony | composer | >= 6.0.0, < 6.4.29 | 6.4.29 |
| symfony/symfony | composer | >= 7.0.0, < 7.3.7 | 7.3.7 |
Ongoing coverage of React2Shell