CVE-2022-23601: CSRF token missing in Symfony

Published Jan 29, 2022
·
Updated

CVE-2022-23601: CSRF token missing in forms

Other sources

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.

GitHub

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. 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. This issue has been resolved in the patch versions listed and users are advised to update. There are no known workarounds for this issue.

Affected Software

8 affected componentsFixes available
composer/symfony/framework-bundle>=5.3.14, <=5.3.14, >=5.4.3, <=5.4.3, >=6.0.3, <=6.0.3
composer/symfony/symfony>=5.3.14, <=5.3.14, >=5.4.3, <=5.4.3, >=6.0.3, <=6.0.3
composer/symfony/framework-bundle=6.0.3
6.0.4
composer/symfony/framework-bundle=5.4.3
5.4.4
composer/symfony/framework-bundle=5.3.14
5.3.15
SensioLabs Symfony<5.3.15
SensioLabs Symfony>=5.4.0<5.4.4
SensioLabs Symfony>=6.0.0<6.0.4

Event History

Jan 29, 2022
Advisory Published
12:00 PM
Feb 1, 2022
CVE Published
via MITRE·12:17 PM
Data Sourced
via MITRE·12:17 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-23601?

CVE-2022-23601 is a vulnerability in Symfony that allows cross-site request forgery (CSRF) attacks by missing a CSRF token in forms.

2

What is the severity of CVE-2022-23601?

CVE-2022-23601 has a severity rating of 8.8 (High).

3

What software versions are affected by CVE-2022-23601?

Symfony versions 5.3.14 up to 5.4.3 and 6.0.3 are affected by CVE-2022-23601.

4

How does Symfony protect against CSRF attacks?

Symfony forms provide CSRF protection by using a random token injected in the form and storing it in the session to validate the token submitted by the user.

5

How can I fix CVE-2022-23601 in my Symfony application?

To fix CVE-2022-23601, update your Symfony framework or Symfony package to versions 5.3.15, 5.4.4, or 6.0.4 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203