Craft CMS stores user-provided content in session files
Craft CMS releases before 4.15.3 and 5.7.5 saved return URLs to PHP sessions without sanitization. Fixed in 4.15.3 and 5.7.5. The vendor severity is not given.
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Actively exploited
- Fix
- Fixed in 5.7.5, 4.15.3
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Craft CMS, a content management system built on PHP, is affected by this vulnerability. An unauthenticated attacker could place arbitrary content, such as PHP code, into server session files, which could potentially be executed on the server if combined with another flaw.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the 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.
Timeline
- CVE published
- Added to CISA KEV
CISA has evidence of exploitation in the wild
- CISA remediation deadline
Due date for US federal agencies to patch
- Record last updated
Affected versions
- Craft CMS
fixed in 5.7.5; fixed in 4.15.3
- craftcms/cmsPackagist
From 5.0.0-alpha.1 · fixed in 5.7.5
- craftcms/cmsPackagist
fixed in 4.15.3
References 5
GitHub · craftcms/cms
cve.org
raw.githubusercontent.com
Questions about CVE-2025-35939
What does this mean?
When a returnUrl is set on a request, Craft CMS saved that URL to session data without sanitizing it, so PHP or HTML code could be stored in session data. The fix sanitizes return URLs before they are saved.Source: github.com, github.com
Am I affected, and how do I check?
Craft CMS releases before 4.15.3 and before 5.7.5, including craftcms/cms 5.0.0-alpha.1 onward up to 5.7.5. To check, run composer show craftcms/cms or review the craftcms/cms version in composer.lock.Source: github.com, github.com
What should I do about it?
Upgrade to 4.15.3 if on the 4.x line, or to 5.7.5 if on the 5.x line.Source: github.com, github.com
Is it being exploited?
Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2025-06-02, which means it has evidence of attacks. No public exploit code is tracked.Source: cisa.gov, cve.now feed data