---
id: "CVE-2025-35939"
kind: "vulnerability"
aliases: ["CVE-2025-35939"]
title: "craftcms craft cms: Craft CMS stores arbitrary content provided by unauthenticated users in session files"
severity: "critical"
cvss: 6.9
epss: null
exploited: true
status: "open"
category: "package"
products: [{"name": "Craft CMS Craft CMS", "fixed": [], "affected": "", "ecosystem": "vendor"}, {"name": "craftcms craft cms", "fixed": ["4.15.3"], "affected": "< 4.15.3", "ecosystem": "vendor"}, {"name": "craftcms craft cms", "fixed": ["5.7.5"], "affected": ">= 5.0.0, < 5.7.5", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["craft-cms", "exploited", "package", "php", "self-hosted"]
not_affected_if: ["not-craft-cms"]
published_at: "2025-05-07T23:15:54+00:00"
first_seen_at: "2026-10-23T19:11:51+00:00"
updated_at: "2026-10-23T22:29:05+00:00"
sources: [{"source": "kev", "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2025-35939", "first_seen_at": "2026-10-23T19:11:51+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-35939", "first_seen_at": "2026-10-23T22:29:05+00:00"}]
---

# craftcms craft cms: Craft CMS stores arbitrary content provided by unauthenticated users in session files

Craft CMS, a PHP content management system, lets an unauthenticated client write attacker-chosen values such as PHP code into a known local file on the server. An attacker can run code on the server, and the CVE notes it can be chained with CVE-2024-58136 (exploited as CVE-2025-32432).

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:Craft CMS Craft CMS affected ? fixed ?
- vendor:craftcms craft cms affected < 4.15.3 fixed 4.15.3
- vendor:craftcms craft cms affected >= 5.0.0, < 5.7.5 fixed 5.7.5

## Fix

Apply the vendor mitigations per Craft CMS instructions; the sources do not name a fixed version.
If no mitigation exists, CISA says to discontinue use of the product.

## Timeline

- 2026-10-23T19:11:51+00:00 kev https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2025-35939
- 2026-10-23T22:29:05+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2025-35939

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
