For some URLs, Symfony's Request class worked out a path that didn't start with /. Access rules written on the assumption that every path starts with a slash could then fail to match, letting an attacker reach pages those rules were meant to protect. The Symfony advisory calls it a limited authorization bypass.
Who is affected
Apps on an affected version of symfony/http-foundation, or of symfony/symfony, that make access decisions from the request path. Examples are access_control entries in security.yaml with patterns like ^/admin, and your own checks on $request->getPathInfo() that expect a leading /.
Checks that don't look at the path at all, such as #[IsGranted] on a controller or a voter, don't rely on that assumption.
What to do
Update symfony/http-foundation to the fixed release for your branch:
- 5.4: update to 5.4.50
- 6.4: update to 6.4.29
- 7.3: update to 7.3.7
The fix makes the request path always start with /.
Discovered by Andrew Atkinson and reported by Chris Smith.