What is wrong
Craft CMS stores unsanitized, user-provided return URL parameters directly inside session files on the server. An unauthenticated attacker can inject arbitrary content, such as PHP code, into a known local file location, which could potentially be executed using an independent vulnerability.
Who is affected
Craft CMS versions prior to 5.7.5 and 4.15.3 are affected.
What to do
Upgrade Craft CMS to version 5.7.5 or 4.15.3 or later to resolve the issue.
Original description
Craft CMS stores arbitrary content provided by unauthenticated users in session files. This content could be accessed and executed, possibly using an independent vulnerability. Craft CMS redirects requests that require authentication to the login page and generates a session file on the server at '/var/lib/php/sessions'. Such session files are named 'sess_[session_value]', where '[session_value]' is provided to the client in a 'Set-Cookie' response header. Craft CMS stores the return URL requested by the client without sanitizing parameters. Consequently, an unauthenticated client can introduce arbitrary values, such as PHP code, to a known local file location on the server. Craft CMS versions 5.7.5 and 4.15.3 have been released to address this issue.
Known exploited (CISA KEV)
- Added to KEV
- 2025-06-02
- Remediation due (US federal)
- 2025-06-23
- Ransomware use
- Unknown
- Required action
- Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Affected software
- CraftCMS * repository or package match
Details
- Published
- 2025-05-08
- Last modified
- 2026-02-27
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N- CWE
- CWE-472
- EPSS (30-day exploit probability)
- 1.37% (percentile 72)
References
- cve.org/CVE-2025-35939
- nvd.nist.gov/vuln/detail/CVE-2025-35939
- github.com/craftcms/cms/pull/17220
- github.com/craftcms/cms/releases/tag/4.15.3
- github.com/craftcms/cms/releases/tag/5.7.5
- www.cve.org/CVERecord?id=CVE-2025-35939
- raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2025/va-25-147-01.json
Track these versions on your own servers
InfraGuard collects installed software versions from every server and flags the ones with known vulnerabilities. Self-hosted — nothing leaves your network.
This product uses data from the NVD API but is not endorsed or certified by the NVD. CVE® is a registered trademark of The MITRE Corporation; CVE records are used under the CVE Program Terms of Use.