Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-35939: CWE-472 External Control of Assumed-Immutable Web Parameter in Craft CMS

0
Medium
VulnerabilityCVE-2025-35939cvecve-2025-35939cwe-472
Published: Wed May 07 2025 (05/07/2025, 22:41:29 UTC)
Source: CVE
Vendor/Project: Craft
Product: CMS

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/26/2026, 21:27:14 UTC

Technical Analysis

CVE-2025-35939 is a vulnerability classified under CWE-472 (External Control of Assumed-Immutable Web Parameter) affecting Craft CMS. The core issue is that Craft CMS stores arbitrary content provided by unauthenticated users within session files located on the server at '/var/lib/php/sessions'. These session files are named 'sess_[session_value]', where the session value is assigned to the client via a 'Set-Cookie' header. When unauthenticated clients request pages requiring authentication, Craft CMS redirects them to the login page and generates a session file that includes the return URL requested by the client. However, this return URL parameter is not properly sanitized before being stored in the session file. As a result, an attacker can inject arbitrary data, including potentially executable PHP code, into a known local file on the server. While the vulnerability itself does not guarantee code execution, it creates a vector for further exploitation if combined with other vulnerabilities such as local file inclusion or code execution flaws. The vulnerability affects Craft CMS versions before 5.7.5 and 4.15.3, which have been released to remediate this issue. The CVSS 3.1 score of 5.3 indicates a medium severity with network attack vector, no privileges required, no user interaction, and an impact limited to integrity compromise without affecting confidentiality or availability.

Potential Impact

This vulnerability can lead to integrity compromise of the web application environment by allowing attackers to inject arbitrary content into session files. If an attacker successfully injects malicious PHP code into these session files and another vulnerability or misconfiguration allows execution of this code, it could lead to remote code execution, unauthorized access, or persistent compromise of the affected system. The impact is particularly significant for organizations relying on Craft CMS for their web presence, as it could undermine the trustworthiness and security of their sites. Although no direct confidentiality or availability impact is indicated, the potential for chained exploitation elevates the risk. Organizations with publicly accessible Craft CMS installations are at risk, especially if they have not applied the patches. The vulnerability can be exploited remotely without authentication or user interaction, increasing the threat surface and ease of exploitation.

Mitigation Recommendations

Organizations should immediately upgrade Craft CMS installations to version 5.7.5 or 4.15.3 or later, which contain fixes for this vulnerability. In addition to patching, administrators should audit session management configurations to ensure that session files are stored securely and that user input is properly sanitized before being written to any server-side files. Implementing strict input validation and output encoding for all parameters, especially those stored in sessions, is critical. Web application firewalls (WAFs) can be configured to detect and block suspicious payloads targeting session parameters. Monitoring server logs for unusual session file modifications or unexpected PHP code fragments can provide early detection of exploitation attempts. Restricting file permissions on session storage directories to prevent unauthorized modifications and isolating web application components can reduce the risk of chained exploits. Finally, organizations should conduct regular security assessments and penetration tests to identify and remediate similar injection vectors.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.1
Assigner Short Name
cisa-cg
Date Reserved
2025-04-15T20:57:14.329Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682cd0fc1484d88663aecb6e

Added to database: 5/20/2025, 6:59:08 PM

Last enriched: 2/26/2026, 9:27:14 PM

Last updated: 3/24/2026, 1:46:09 PM

Views: 112

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses