CVE-2022-24895: Symfony/security bundle Symfony Vulnerable To Session Fixation Vulnerability
MODERATECVE-2022-24895 is a MODERATE (CVSS 6.3) symfony vulnerable to session fixation vulnerability (CWE-613: Insufficient Session Expiration) affecting Symfony/security bundle libraries in the Packagist ecosystem. The issue involves symfony vulnerable to session fixation of csrf tokens. Remediation is available by upgrading affected packages to version 4.4.50, 5.4.20, 6.0.20, 6.1.12, 6.2.6.
CVE-2022-24895 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L).
How to Fix CVE-2022-24895
To remediate this vulnerability, upgrade all affected Symfony/security bundle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade symfony/security-bundle to 4.4.50
Upgrade symfony/security-bundle to 5.4.20
Upgrade symfony/security-bundle to 6.0.20
Upgrade symfony/security-bundle to 6.1.12
Upgrade symfony/security-bundle to 6.2.6
Upgrade symfony/symfony to 4.4.50
Upgrade symfony/symfony to 5.4.20
Upgrade symfony/symfony to 6.0.20
Upgrade symfony/symfony to 6.1.12
Upgrade symfony/symfony to 6.2.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/security-bundle
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-24895, inspect your project dependencies for Symfony/security bundle:
inspect dependencies for symfony/security-bundle
Analyze the terminal output to locate any version of Symfony/security bundle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.50), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Symfony/security bundle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-24895 Affected Symfony/security bundle Versions
10 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/security-bundle
|
Packagist |
≥ 2.0.0
< 4.4.50
|
4.4.50
|
|
symfony/security-bundle
|
Packagist |
≥ 5.0.0
< 5.4.20
|
5.4.20
|
|
symfony/security-bundle
|
Packagist |
≥ 6.0.0
< 6.0.20
|
6.0.20
|
|
symfony/security-bundle
|
Packagist |
≥ 6.1.0
< 6.1.12
|
6.1.12
|
|
symfony/security-bundle
|
Packagist |
≥ 6.2.0
< 6.2.6
|
6.2.6
|
|
symfony/symfony
|
Packagist |
≥ 2.0.0
< 4.4.50
|
4.4.50
|
|
symfony/symfony
|
Packagist |
≥ 5.0.0
< 5.4.20
|
5.4.20
|
|
symfony/symfony
|
Packagist |
≥ 6.0.0
< 6.0.20
|
6.0.20
|
|
symfony/symfony
|
Packagist |
≥ 6.1.0
< 6.1.12
|
6.1.12
|
|
symfony/symfony
|
Packagist |
≥ 6.2.0
< 6.2.6
|
6.2.6
|
References
Frequently Asked Questions
What is CVE-2022-24895?
Which Symfony/security bundle versions are affected?
What version fixes CVE-2022-24895?
Is symfony/security-bundle affected?
Is symfony/symfony affected?
What is the CVSS score of CVE-2022-24895?
What CWE is associated with CVE-2022-24895?
How can I check Packagist dependencies for CVE-2022-24895?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3gv2-29qc-v67m",
"modified" : "2025-02-13T18:36:42Z",
"published" : "2023-02-01T18:48:06Z",
"aliases" : [ "CVE-2022-24895" ],
"summary" : "Symfony vulnerable to Session Fixation of CSRF tokens",
"details" : "Description\n-----------\n\nWhen 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](https://canitakeyoursubdomain.name/) to bypass the CSRF protection mechanism by performing an attack similar to a session-fixation.\n\nResolution\n----------\n\nSymfony removes all CSRF tokens from the session on successful login.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/5909d74ecee359ea4982fcf4331aaf2e489a1fd4) for branch 4.4.\n\nCredits\n-------\n\nWe would like to thank Marco Squarcina for reporting the issue and Nicolas Grekas for fixing it.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "4.4.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.4.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.0.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.1.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.2.0"
}, {
"fixed" : "6.2.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "4.4.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.4.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.0.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.1.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.2.0"
}, {
"fixed" : "6.2.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-3gv2-29qc-v67m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24895"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/security-bundle/commit/076fd2088ada33d760758d98ff07ddedbf567946"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/5909d74ecee359ea4982fcf4331aaf2e489a1fd4"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-bundle/CVE-2022-24895.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2022-24895.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/07/msg00014.html"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2022-24895"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-384", "CWE-613" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-01T18:48:06Z",
"nvd_published_at" : "2023-02-03T22:15:00Z"
}
}