Miggo Logo

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

6.3

CVSS Score
3.1

Basic Information

EPSS Score
0.02053%
Published
2/1/2023
Updated
7/12/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
symfony/security-bundlecomposer>= 2.0.0, < 4.4.504.4.50
symfony/security-bundlecomposer>= 5.0.0, < 5.4.205.4.20
symfony/security-bundlecomposer>= 6.0.0, < 6.0.206.0.20
symfony/security-bundlecomposer>= 6.1.0, < 6.1.126.1.12
symfony/security-bundlecomposer>= 6.2.0, < 6.2.66.2.6
symfony/symfonycomposer>= 2.0.0, < 4.4.504.4.50
symfony/symfonycomposer>= 5.0.0, < 5.4.205.4.20
symfony/symfonycomposer>= 6.0.0, < 6.0.206.0.20
symfony/symfonycomposer>= 6.1.0, < 6.1.126.1.12
symfony/symfonycomposer>= 6.2.0, < 6.2.66.2.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from Symfony's session management not clearing CSRF tokens during login. The SessionAuthenticationStrategy's onAuthentication method was responsible for session migration but lacked CSRF token clearance. The patch introduced a ClearableTokenStorageInterface dependency and added CSRF token clearance in this method, confirming this was the vulnerable point. The commit diff explicitly shows the addition of CSRF token clearing logic in this function during migration.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

**s*ription ----------- W**n *ut**nti**tin* us*rs Sym*ony *y ****ult r***n*r*t*s t** s*ssion I* upon lo*in, *ut pr*s*rv*s t** r*st o* s*ssion *ttri*ut*s. ****us* t*is *o*s not *l**r *SR* tok*ns upon lo*in, t*is mi**t *n**l*s [s*m*-sit* *tt**k*rs](*t

Reasoning

T** vuln*r**ility st*ms *rom Sym*ony's s*ssion m*n***m*nt not *l**rin* *SR* tok*ns *urin* lo*in. T** `S*ssion*ut**nti**tionStr*t**y`'s `on*ut**nti**tion` m*t*o* w*s r*sponsi*l* *or s*ssion mi*r*tion *ut l**k** *SR* tok*n *l**r*n**. T** p*t** intro*u*