MediumGHSA-83c3-qx27-2rwrCVE-2012-6431

Symfony Allows URI Restrictions Bypass Via Double-Encoded String

Published 17 May 2022 · Updated 3 Dec 2024

Affected packages

Affected
>=2.0.0 <2.0.19
Fixed in
2.0.19
Update to the fixed version for your release line, for example:composer require symfony/http-foundation:^2.0.19
Affected
>=2.0.0 <2.0.19
Fixed in
2.0.19
Update to the fixed version for your release line, for example:composer require symfony/routing:^2.0.19
Affected
>=2.0.0 <2.0.19
Fixed in
2.0.19
Update to the fixed version for your release line, for example:composer require symfony/security:^2.0.19
Affected
>=2.0.0 <2.0.19
Fixed in
2.0.19
Update to the fixed version for your release line, for example:composer require symfony/symfony:^2.0.19

Details

On the Symfony 2.0.x version, there's a security issue that allows access to routes protected by a firewall even when the user is not logged in.

Both the Routing component and the Security component uses the path returned by getPathInfo() to match a Request. The getPathInfo() returns a decoded path, but the Routing component (Symfony\Component\Routing\Matcher\UrlMatcher) decodes the path a second time; whereas the Security component, Symfony\Component\HttpFoundation\RequestMatcher, does not.

This difference causes Symfony 2.0 to be vulnerable to double encoding attacks.

Is GHSA-83c3-qx27-2rwr in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected symfony/http-foundation, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.