CVE-2025-35939Craft CMS session file injection leading to code execution
CVSS score
6.9
Medium
CVSS 4.0 from 9119a7d8-5eab-497f-8521-727c672e3725
Exploit probability (EPSS)
1.37%
1.37% chance of exploitation in the next 30 days, higher than 72.7% of all CVEs.
CISA KEV
Actively exploited
Added to KEV on 2 Jun 2025.
US federal deadline to fix: 23 Jun 2025.
In plain words
An unauthenticated attacker can send a crafted return URL that gets written into a PHP session file on the server, and if that file is later executed, it can run code. Craft CMS versions before 4.15.3 and from 5.0.0 before 5.7.5 are affected. CISA reports active exploitation, so update to 4.15.3 or 5.7.5 now, or take the vendor-recommended mitigations.
Official 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.
Source: NVD · CNA: 9119a7d8-5eab-497f-8521-727c672e3725
How to fix it, step by step
Treat it as urgent
Attackers are already exploiting this flaw: CISA added it to its Known Exploited Vulnerabilities list on 2 Jun 2025.
US federal agencies must fix it by 23 Jun 2025. It's a sensible deadline for everyone else too.
CISA's full instruction
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Check whether you're affected
Find every system running Craft Cms, Craft CMS and compare its version with the affected versions.
Update to a fixed version
- Update Craft Cms, CMS to 4.15.3, 5.7.5 or later, on the branch you run.
If you can't update right away
Apply the workaround or mitigation in the vendor's advisory until you can update:
Check for signs of compromise
Updating closes the flaw but doesn't remove an attacker who got in earlier. Review affected systems for unknown accounts, unusual logins and configuration changes, and use any indicators of compromise the vendor or CISA publish.
Confirm the fix
Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.
Was this useful?
How it can be exploited
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Values in red make the vulnerability easier to exploit or more damaging. 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Affected products
| Affected products | Versions |
|---|---|
| Craft CMS Craft Cms | < 4.15.3 · ≥ 5.0.0, < 5.7.5 |
| Craft CMS | < 5.7.5 · < 4.15.3 |
Weakness
Timeline
- Published:
- Added to CISA KEV:
- Last modified:
Frequently asked questions
Is CVE-2025-35939 being exploited?
Yes. CISA added CVE-2025-35939 to its Known Exploited Vulnerabilities catalog on 2 Jun 2025, which means there is evidence of exploitation in the wild. Its EPSS score estimates a 1.4% probability of exploitation in the next 30 days.
What is the CVSS score of CVE-2025-35939?
CVE-2025-35939 has a CVSS 4.0 base score of 6.9 (medium).
Which versions are affected?
Craft CMS Craft Cms (< 4.15.3; ≥ 5.0.0, < 5.7.5), Craft CMS (< 5.7.5; < 4.15.3)
Is there a patch for CVE-2025-35939?
The official record links to vendor advisories or patches; see “What to do” above.
References
- github.com/craftcms/cms/pull/17220(Patch)
- github.com/craftcms/cms/releases/tag/4.15.3(Release Notes)
- github.com/craftcms/cms/releases/tag/5.7.5(Release Notes)
- raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2025/va-25-147-01.json(Third Party Advisory)
- www.cve.org/CVERecord?id=CVE-2025-35939(VDB Entry)
- www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-35939(US Government Resource)
Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.