CVE-2025-35939 in Craftcms Craft Cms
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/sessi...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Craftcms | Craft Cms | < 4.15.3 ≥ 5.0.0, < 5.7.5 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Yes added 2025-06-02 |
|---|---|
| Public exploit | Not confirmed |
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: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2025-35939 |
|---|---|
| BreachSpider ID | BS-2025-GLOBAL-278219-M |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| Published | 2025-05-07 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-472: CWE-472
Related attack patterns (CAPEC)
CAPEC-31 Accessing/Intercepting/Modifying HTTP Cookies via CWE-472
CAPEC-146 XML Schema Poisoning via CWE-472
CAPEC-226 Session Credential Falsification through Manipulation via CWE-472
CAPEC-39 Manipulating Opaque Client-based Data Tokens via CWE-472
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
Craft CMS versions prior to 5.7.5 and 4.15.3 store arbitrary content from unauthenticated users in session files, which could potentially be accessed and executed. This issue poses a risk of unauthorized code execution and data tampering.
An unauthenticated attacker can provide arbitrary content, including potential PHP code, to the server's session files. The server stores this content without proper sanitization, allowing the attacker to introduce malicious code that could be executed if accessed.
Compensating controls AI-drafted, review before use
Implement strict input validation and sanitization for all user-provided data before storing it in session files. Ensure that session files are not executable and are stored in a secure, non-web-accessible directory.
NERC CIP: CIP-007 CIP-007-R2
IEC 62443: SR 7.6
Not validated for your network. A compensating control does not replace the vendor fix.
Questions
What is CVE-2025-35939?
Craft CMS versions prior to 5.7.5 and 4.15.3 store arbitrary content from unauthenticated users in session files, which could potentially be accessed and executed. This issue poses a risk of unauthorized code execution and data tampering.
What is the CVSS score for CVE-2025-35939?
CVE-2025-35939 has CVSS 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N. EPSS: 2.1%.
Is CVE-2025-35939 actively exploited?
Yes. CVE-2025-35939 is in the CISA known-exploited catalog (added 2025-06-02). Active exploitation confirmed. Immediate patching required.
How do I remediate CVE-2025-35939?
Priority: MEDIUM.
What systems are affected by CVE-2025-35939?
CVE-2025-35939 affects Craftcms Craft Cms.
What NERC-CIP standard applies to CVE-2025-35939?
NERC CIP CIP-007 CIP-007-R2: This CVE violates CIP-007-R2 because it allows unauthorized access to and potential execution of arbitrary code, which can compromise the integrity and security of the system.
What IEC 62443 requirement maps to CVE-2025-35939?
IEC 62443 SR 7.6: This CVE maps to SR 7.6 because it involves the storage of unvalidated user input, which can lead to code injection and execution, compromising the security of the system.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Craftcms","product":"Craft Cms","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.