CVE-2025-35939: CWE-472 External Control of Assumed-Immutable Web Parameter in 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/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 Analysis
Technical Summary
CVE-2025-35939 is a medium severity vulnerability affecting Craft CMS, a popular content management system. The vulnerability arises because Craft CMS stores arbitrary content provided by unauthenticated users in session files located on the server, specifically under '/var/lib/php/sessions'. These session files are named using a predictable pattern 'sess_[session_value]', where the session value is provided to the client in a 'Set-Cookie' header. The core issue is that Craft CMS stores the return URL requested by the client without properly sanitizing parameters. This allows an unauthenticated attacker to inject arbitrary values, potentially including PHP code, into a known local file location on the server. Although the vulnerability itself does not directly allow code execution, it creates a scenario where an attacker could leverage an independent vulnerability or misconfiguration to execute the injected code. The vulnerability is classified under CWE-472, which involves external control of an assumed-immutable web parameter, indicating that the application trusts user input that should be immutable or controlled internally. Craft CMS versions prior to 5.7.5 and 4.15.3 are affected, with patches released in these versions to address the issue. The CVSS v3.1 base score is 5.3, reflecting a medium severity with network attack vector, low attack complexity, no privileges required, no user interaction, unchanged scope, no confidentiality impact, limited integrity impact, and no availability impact. No known exploits are currently reported in the wild.
Potential Impact
For European organizations using Craft CMS, this vulnerability poses a risk primarily to the integrity of their web applications. An attacker could inject malicious content into session files, which might be executed if combined with other vulnerabilities or server misconfigurations, potentially leading to unauthorized code execution or manipulation of application behavior. This could result in defacement, data tampering, or further compromise of the web server. Since Craft CMS is used by various businesses, including media, e-commerce, and government websites, exploitation could disrupt services or damage reputation. The vulnerability does not directly affect confidentiality or availability but could be a stepping stone for more severe attacks. European organizations with public-facing Craft CMS installations are particularly at risk, especially if they have not applied the patches. The medium severity suggests that while exploitation is feasible without authentication, it requires some conditions to be met, limiting the immediate widespread impact but still necessitating prompt remediation.
Mitigation Recommendations
European organizations should immediately upgrade Craft CMS to versions 5.7.5 or 4.15.3 or later, where the vulnerability has been addressed. In addition to patching, organizations should implement strict input validation and sanitization for all user-supplied parameters, especially those stored in session files or used in file paths. Web application firewalls (WAFs) can be configured to detect and block suspicious payloads targeting session management endpoints. Regularly audit session storage directories to detect anomalous files or unexpected content. Employ least privilege principles for the web server process to restrict its ability to execute or include session files as code. Monitoring and logging access to session files can help detect exploitation attempts. Finally, conduct security assessments to identify any chained vulnerabilities that could be exploited in conjunction with this issue to achieve code execution.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland
CVE-2025-35939: CWE-472 External Control of Assumed-Immutable Web Parameter in Craft 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
Technical Analysis
CVE-2025-35939 is a medium severity vulnerability affecting Craft CMS, a popular content management system. The vulnerability arises because Craft CMS stores arbitrary content provided by unauthenticated users in session files located on the server, specifically under '/var/lib/php/sessions'. These session files are named using a predictable pattern 'sess_[session_value]', where the session value is provided to the client in a 'Set-Cookie' header. The core issue is that Craft CMS stores the return URL requested by the client without properly sanitizing parameters. This allows an unauthenticated attacker to inject arbitrary values, potentially including PHP code, into a known local file location on the server. Although the vulnerability itself does not directly allow code execution, it creates a scenario where an attacker could leverage an independent vulnerability or misconfiguration to execute the injected code. The vulnerability is classified under CWE-472, which involves external control of an assumed-immutable web parameter, indicating that the application trusts user input that should be immutable or controlled internally. Craft CMS versions prior to 5.7.5 and 4.15.3 are affected, with patches released in these versions to address the issue. The CVSS v3.1 base score is 5.3, reflecting a medium severity with network attack vector, low attack complexity, no privileges required, no user interaction, unchanged scope, no confidentiality impact, limited integrity impact, and no availability impact. No known exploits are currently reported in the wild.
Potential Impact
For European organizations using Craft CMS, this vulnerability poses a risk primarily to the integrity of their web applications. An attacker could inject malicious content into session files, which might be executed if combined with other vulnerabilities or server misconfigurations, potentially leading to unauthorized code execution or manipulation of application behavior. This could result in defacement, data tampering, or further compromise of the web server. Since Craft CMS is used by various businesses, including media, e-commerce, and government websites, exploitation could disrupt services or damage reputation. The vulnerability does not directly affect confidentiality or availability but could be a stepping stone for more severe attacks. European organizations with public-facing Craft CMS installations are particularly at risk, especially if they have not applied the patches. The medium severity suggests that while exploitation is feasible without authentication, it requires some conditions to be met, limiting the immediate widespread impact but still necessitating prompt remediation.
Mitigation Recommendations
European organizations should immediately upgrade Craft CMS to versions 5.7.5 or 4.15.3 or later, where the vulnerability has been addressed. In addition to patching, organizations should implement strict input validation and sanitization for all user-supplied parameters, especially those stored in session files or used in file paths. Web application firewalls (WAFs) can be configured to detect and block suspicious payloads targeting session management endpoints. Regularly audit session storage directories to detect anomalous files or unexpected content. Employ least privilege principles for the web server process to restrict its ability to execute or include session files as code. Monitoring and logging access to session files can help detect exploitation attempts. Finally, conduct security assessments to identify any chained vulnerabilities that could be exploited in conjunction with this issue to achieve code execution.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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: 8/5/2025, 1:08:03 AM
Last updated: 8/6/2025, 12:34:11 AM
Views: 14
Related Threats
CVE-2025-8950: SQL Injection in Campcodes Online Recruitment Management System
MediumCVE-2025-27388: CWE-20 Improper Input Validation in OPPO OPPO HEALTH APP
HighCVE-2025-8949: Stack-based Buffer Overflow in D-Link DIR-825
HighCVE-2025-8948: SQL Injection in projectworlds Visitor Management System
MediumCVE-2025-8947: SQL Injection in projectworlds Visitor Management System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.