CVE-2025-35939: Craftcms/cms Craft CMS Stores Arbitrary Content Vulnerability
MODERATECVE-2025-35939 is a MODERATE (CVSS 5.3) craft cms stores arbitrary content vulnerability (CWE-472: External Control of Assumed-Immutable Web Parameter) affecting Craftcms/cms libraries in the Packagist ecosystem. The issue involves craft cms stores arbitrary content provided by unauthenticated users in session files. Remediation is available by upgrading affected packages to version 5.7.5, 4.15.3.
CVE-2025-35939 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N/E:H).
How to Fix CVE-2025-35939
To remediate this vulnerability, upgrade all affected Craftcms/cms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade craftcms/cms to 5.7.5
Upgrade craftcms/cms to 4.15.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for craftcms/cms
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-35939, inspect your project dependencies for Craftcms/cms:
inspect dependencies for craftcms/cms
Analyze the terminal output to locate any version of Craftcms/cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.7.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-472: External Control of Assumed-Immutable Web Parameter, where the web application does not sufficiently verify inputs that are assumed to be immutable but are actually externally controllable, such as hidden form fields. In Craftcms/cms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-35939 Affected Craftcms/cms Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
craftcms/cms
|
Packagist |
≥ 5.0.0-alpha.1
< 5.7.5
|
5.7.5
|
|
craftcms/cms
|
Packagist |
< 4.15.3
|
4.15.3
|
References
Frequently Asked Questions
What is CVE-2025-35939?
Which Craftcms/cms versions are affected?
What version fixes CVE-2025-35939?
Is craftcms/cms affected?
What is the CVSS score of CVE-2025-35939?
What CWE is associated with CVE-2025-35939?
How can I check Packagist dependencies for CVE-2025-35939?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7vrx-9684-xrf2",
"modified" : "2025-10-22T19:30:22Z",
"published" : "2025-05-08T00:31:12Z",
"aliases" : [ "CVE-2025-35939" ],
"summary" : "Craft CMS stores arbitrary content provided by unauthenticated users in session files",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N/E:H"
}, {
"type" : "CVSS_V4",
"score" : "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/E:A"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "craftcms/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0-alpha.1"
}, {
"fixed" : "5.7.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "craftcms/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.15.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-35939"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/pull/17220"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/commit/e4c7bac8f31010aee048409f9ef6f744a83146b2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/craftcms/cms"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/releases/tag/4.15.3"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/releases/tag/5.7.5"
}, {
"type" : "WEB",
"url" : "https://raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2025/va-25-147-01.json"
}, {
"type" : "WEB",
"url" : "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-35939"
}, {
"type" : "WEB",
"url" : "https://www.cve.org/CVERecord?id=CVE-2025-35939"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-472" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-05-08T14:53:02Z",
"nvd_published_at" : "2025-05-07T23:15:54Z"
}
}