CVE-2025-35939
JSON

6.9mediumExploited

Craft CMS stores user-provided content in session files

Severity
6.9medium CVSS:4.0 by cisa-cg
Exploit likelihood
2.12% (higher than 83% of CVEs)
Published
Last changed
Assigned by
cisa-cg
Also known as
GHSA-7vrx-9684-xrf2

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.

Affected

Product or packageVersionsReported by
Craft CMSbefore 5.7.5, before 4.15.3
Not affected: 5.7.5, 4.15.3
CVE List
craftcms/cms (Packagist)from 5.0.0-alpha.1 before 5.7.5, before 4.15.3GitHub Advisory Database
craftcms craft_cmsbefore 4.15.3, from 5.0.0 before 5.7.5NVD
Craft CMS Craft CMSNot specifiedCISA KEV

All scores

cisa-cg5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
cisa-cg6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N/E:H
GitHubmedium CVSS:4.0CVSS: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:A
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Classification

CWE-472

SSVC (cisa-cg): exploitation active, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

Craft CMS almacena contenido arbitrario proporcionado por usuarios no autenticados en archivos de sesión. Este contenido podría ser accedido y ejecutado, posiblemente aprovechando una vulnerabilidad independiente. Craft CMS redirige las solicitudes que requieren autenticación a la página de inicio de sesión y genera un archivo de sesión en el servidor, en `/var/lib/php/sessions`. Estos archivos de sesión se denominan `sess_[session_value]`, donde `[session_value]` se proporciona al cliente en un encabezado de respuesta `Set-Cookie`. Craft CMS almacena la URL de retorno solicitada por el cliente sin parámetros de limpieza. Por lo tanto, un cliente no autenticado puede introducir valores arbitrarios, como código PHP, en una ubicación de archivo local conocida en el servidor. Se han publicado las versiones 5.7.5 y 4.15.3 de Craft CMS para solucionar este problema.

CISA KEV

Craft CMS contains an external control of assumed-immutable web parameter vulnerability. This vulnerability could allow an unauthenticated client to introduce arbitrary values, such as PHP code, to a known local file location on the server. This vulnerability could be chained with CVE-2024-58136 as represented by CVE-2025-32432.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-35939 changed 2026-02-26CVE Terms of Use
GitHub Advisory DatabaseGHSA-7vrx-9684-xrf2 changed 2025-10-22CC-BY-4.0
NVDCVE-2025-35939 changed 2026-06-17Public domain
CISA KEVCVE-2025-35939 changed 2025-06-02CC0-1.0