High

CSRF token missing in Symfony

  • Disclosed: 01.02.2022
  • Updated: 11.10.2026 10:22

Description

The Symfony form component provides a CSRF protection mechanism by using a random token injected in the form and using the session to store and control the token submitted by the user. When using the FrameworkBundle, this protection can be enabled or disabled with the configuration. If the configuration is not specified, by default, the mechanism is enabled as long as the session is enabled.

In a recent change in the way the configuration is loaded, the default behavior has been dropped and, as a result, the CSRF protection is not enabled in form when not explicitly enabled, which makes the application sensible to CSRF attacks.

Resolution

Symfony restored the default configuration to enable the CSRF protection by default.

The patch for this issue is available here for branch 5.3.

Credits

We would like to thank Catalin Dan and David Lochner for reporting the issue and Jérémy Derussé for fixing the issue.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package symfony/framework-bundle >= 5.3.14, < 5.3.15, >= 5.4.3, < 5.4.4, >= 6.0.3, < 6.0.4 5.3.15, 5.4.4, 6.0.4

References

CVSS score 8.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Weakness (CWE)
CWE-352
Platform
Composer
Package
symfony/framework-bundle
Disclosed
01.02.2022
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-vvmr-8829-6whx - CC BY 4.0

Vulnerability history: symfony/framework-bundle

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
11.2019 05.2024
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 2
  • Medium 1

Disclosures per year

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 1
  5. 2023: 0
  6. 2024: 1
  7. 2025: 0
  8. 2026: 0
  1. High · 7.5 CVE-2014-4931 >= 2.0.0, < 2.3.18, >= 2.4.0, < 2.4.8, >= 2.5.0, < 2.5.2 2.3.18, 2.4.8, 2.5.2
  2. CSRF token missing in Symfony this entry
    High · 8.1 CVE-2022-23601 >= 5.3.14, < 5.3.15, >= 5.4.3, < 5.4.4, >= 6.0.3, < 6.0.4 5.3.15, 5.4.4, 6.0.4
  3. Medium · 5.4 CVE-2019-10909 >= 2.7.0, < 2.7.51, >= 2.8.0, < 2.8.50, >= 3.0.0, < 3.4.26, >= 4.0.0, < 4.1.12, >= 4.2.0, < 4.2.7 2.7.51, 2.8.50, 3.4.26, 4.1.12, 4.2.7

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.