CVE-2022-24895 Symfony vulnerable to Session Fixation of CSRF tokens

Medium 6.3 Published Updated

Attackers can bypass CSRF protection in Symfony by exploiting session fixation during login, allowing unauthorized actions on behalf of authenticated users.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-24895?

CVE-2022-24895 is a medium-severity vulnerability in Sensiolabs Symfony, published on 3 Feb 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. When authenticating users Symfony by default regenerates the session ID upon login, but preserves the rest of session attributes. Because this does not clear CSRF tokens upon login, this might enables same-site attackers to bypass the CSRF protection mechanism by performing an attack similar to a session-fixation. This issue has been fixed in the 4.4 branch.

Weakness: CWE-613, CWE-384

Which versions are affected by CVE-2022-24895?

21 open source packages ship an affected version, including symfony/security-bundle, symfony and symfony/symfony. It affects 1 product.

PackageAffectedFixed in
symfony/security-bundle PackagistFrom 2.0.04.4.50
symfony/security-bundle PackagistFrom 2.0.04.4.50
symfony/security-bundle PackagistFrom 5.0.05.4.20
symfony/security-bundle PackagistFrom 5.0.05.4.20
symfony/security-bundle PackagistFrom 6.0.06.0.20
symfony/security-bundle PackagistFrom 6.0.06.0.20
15 more packages
symfony/security-bundle PackagistFrom 6.1.06.1.12
symfony/security-bundle PackagistFrom 6.1.06.1.12
symfony/security-bundle PackagistFrom 6.2.06.2.6
symfony/security-bundle PackagistFrom 6.2.06.2.6
symfony BitnamiFrom 2.0.04.4.50, 5.4.20, 6.0.20, 6.1.12, 6.2.6
symfony/symfony PackagistFrom 2.0.04.4.50
symfony/symfony PackagistFrom 2.0.04.4.50
symfony/symfony PackagistFrom 5.0.05.4.20
symfony/symfony PackagistFrom 5.0.05.4.20
symfony/symfony PackagistFrom 6.0.06.0.20
symfony/symfony PackagistFrom 6.0.06.0.20
symfony/symfony PackagistFrom 6.1.06.1.12
symfony/symfony PackagistFrom 6.1.06.1.12
symfony/symfony PackagistFrom 6.2.06.2.6
symfony/symfony PackagistFrom 6.2.06.2.6

Products include Sensiolabs Symfony.

How do I fix CVE-2022-24895?

Upgrade symfony/security-bundle to a fixed version for your release line: 4.4.50, 5.4.20, 6.0.20 or 6.1.12.

Is CVE-2022-24895 being exploited?

There is no known exploitation of CVE-2022-24895 in the wild and no public exploit code.

All Sensiolabs Symfony vulnerabilities

Sources

Also known as BIT-symfony-2022-24895, DEBIAN-CVE-2022-24895, GHSA-3gv2-29qc-v67m, UBUNTU-CVE-2022-24895.

Is CVE-2022-24895 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free