CVE-2025-35939mediumunder attackCWE-472

CVE-2025-35939: medium-severity vulnerability in Craft CMS

Craft CMS stores user-provided content in session files

Published · Updated

E-mail alert when it lands in KEV, gets a public PoC or its score goes up.

43Vexday Risk Score

Prioritize patching. It under exploitation confirmed by CISA.

ssvc Attendcvss 6.9epss 1.4%
from disclosure to weapon
Published on NVDMay 7
CISA KEV+26d
Action required by CISAfederal deadline: 2025-06-23

Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.

In short

Craft CMS stores unsanitized user input in session files on the server, which could be accessed and executed if combined with another vulnerability. An attacker can inject malicious content (like PHP code) into these files without authentication.

Technical detail

Unauthenticated attackers can inject arbitrary content into session files via unsanitized return URL parameters stored by Craft CMS during authentication redirects. Session files are created at predictable locations (/var/lib/php/sessions/sess_[session_value]), and the injected content may be executed if accessed through a separate vulnerability, leading to potential code execution or information disclosure.

Summary generated and translated by AI from the official description.

The full analysis of this CVE is available in Portuguese →

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.
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
Affected products
Craft · CMS