CVE-2022-24895
PHP vulnerability analysis and mitigation

Overview

CVE-2022-24895 affects Symfony, a PHP framework for web and console applications. The vulnerability was discovered when it was found that Symfony, by default, regenerates the session ID upon login but preserves other session attributes. This preservation of session attributes, specifically CSRF tokens, could enable same-site attackers to bypass the CSRF protection mechanism through an attack similar to session fixation. The vulnerability was reported by Marco Squarcina and was fixed in February 2023 (Symfony Advisory).

Technical details

The vulnerability affects multiple versions of Symfony, including versions from 2.0.0 up to 4.4.50, 5.0.0 to 5.4.20, 6.0.0 to 6.0.20, 6.1.0 to 6.1.12, and 6.2.0 to 6.2.6. The issue received a CVSS v3.1 base score of 8.8 (HIGH) from NVD with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, while GitHub assessed it as 6.3 (MEDIUM) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L (NVD).

Impact

The vulnerability could allow same-site attackers to bypass the CSRF protection mechanism, potentially leading to unauthorized actions being performed on behalf of authenticated users. The preservation of CSRF tokens after login creates a condition similar to session fixation, which could be exploited by attackers to perform cross-site request forgery attacks (Debian LTS).

Exploitability

The vulnerability requires a same-site attacker scenario and user interaction. The attack vector is similar to session fixation, where an attacker could potentially exploit the preserved CSRF tokens after user authentication to bypass CSRF protections (Symfony Advisory).

Mitigation and workarounds

The issue has been fixed in Symfony versions 4.4.50, 5.4.20, 6.0.20, 6.1.12, and 6.2.6. The fix involves removing all CSRF tokens from the session on successful login. The patch was implemented by Nicolas Grekas and is available in the security updates (Symfony Advisory, Security Patch).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-77143HIGH8.8
  • PHP logoPHP
  • composer://jweiland/pforum
NoYesAug 25, 2026
CVE-2026-77142HIGH8.8
  • PHP logoPHP
  • composer://jweiland/yellowpages2
NoYesAug 25, 2026
CVE-2026-77146HIGH8.3
  • PHP logoPHP
  • composer://in2code/femanager
NoYesAug 25, 2026
CVE-2026-77145HIGH7.1
  • PHP logoPHP
  • composer://jweiland/events2
NoYesAug 25, 2026
CVE-2026-77144HIGH7.1
  • PHP logoPHP
  • composer://jweiland/events2
NoYesAug 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management