{"id":"CVE-2025-35939","published":"2025-05-07T23:15:54Z","modified":"2026-06-17T09:14:18Z","title":"Craft CMS External Control of Assumed-Immutable Web Parameter Vulnerability","vendor":"Craft CMS","product":"Craft CMS","tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"NVD"},"summary":{"text":"Craft CMS has a flaw in how it handles the return URL for login redirects: it stores the client-supplied URL in the server-side session file without sanitizing its parameters, letting attacker-controlled content end up in files under the PHP session directory. An unauthenticated remote attacker can exploit this over the network with no privileges or user interaction, simply by sending crafted requests that trigger the login redirect, with the attacker-supplied content then possibly executed through a separate, independent vulnerability.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-23T07:14:53Z"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"NVD"},"epss":{"score":0.01349,"percentile":0.71416,"date":"2026-10-29","provenance":"source"},"kev":{"dateAdded":"2025-06-02","dueDate":"2025-06-23","ransomware":false,"requiredAction":"Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.","notes":"https://github.com/craftcms/cms/pull/17220 ;   https://nvd.nist.gov/vuln/detail/CVE-2025-35939","provenance":"source"},"vulncheckKev":{"dateAdded":"2025-06-02","exploitedFirstSeen":"2025-06-02","ransomware":false,"evidence":[{"url":"https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json","date":"2025-06-02"},{"url":"https://www.loginsoft.com/reports/annually/vulnerability-intelligence-report-2025","date":"2026-01-20"}],"evidenceTotal":2,"provenance":"source"},"exploited":true,"otx":{"pulseCount":50,"pulses":[{"name":"Actively_Exploited_Kev | Oct 30, 2026","url":"https://otx.alienvault.com/pulse/6ae35d889ea92b4ce19c2680","created":"2026-10-29"},{"name":"Actively_Exploited_Kev | Oct 29, 2026","url":"https://otx.alienvault.com/pulse/6ae20c1db17e7057ae7d9ad1","created":"2026-10-28"},{"name":"Actively_Exploited_Kev | Oct 28, 2026","url":"https://otx.alienvault.com/pulse/6ae0ba7e0e2a97ff7b218819","created":"2026-10-27"},{"name":"Actively_Exploited_Kev | Oct 27, 2026","url":"https://otx.alienvault.com/pulse/6adf68b85c3e852f3c111d18","created":"2026-10-26"},{"name":"Actively_Exploited_Kev | Oct 24, 2026","url":"https://otx.alienvault.com/pulse/6adb740e397c3ad4799aa4cd","created":"2026-10-23"},{"name":"Actively_Exploited_Kev | Oct 23, 2026","url":"https://otx.alienvault.com/pulse/6ada236fcfba2dfa730ea482","created":"2026-10-22"},{"name":"Actively_Exploited_Kev | Oct 22, 2026","url":"https://otx.alienvault.com/pulse/6ad8d33a077cbb5cab524d80","created":"2026-10-21"},{"name":"Actively_Exploited_Kev | Oct 21, 2026","url":"https://otx.alienvault.com/pulse/6ad78130c4d1ac2be83a8b6d","created":"2026-10-20"},{"name":"Actively_Exploited_Kev | Oct 20, 2026","url":"https://otx.alienvault.com/pulse/6ad62f63c24a405a3423cc13","created":"2026-10-19"},{"name":"Actively_Exploited_Kev | Oct 19, 2026","url":"https://otx.alienvault.com/pulse/6ad4dda174e5797d0bd238b7","created":"2026-10-18"}],"provenance":"machine"},"cwes":[{"id":"CWE-472","name":"External Control of Assumed-Immutable Web Parameter"}],"references":[{"url":"https://github.com/craftcms/cms/pull/17220","tags":["Patch"]},{"url":"https://github.com/craftcms/cms/releases/tag/4.15.3","tags":["Release Notes"]},{"url":"https://github.com/craftcms/cms/releases/tag/5.7.5","tags":["Release Notes"]},{"url":"https://raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2025/va-25-147-01.json","tags":["Third Party Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-35939","tags":["VDB Entry"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-35939","tags":["US Government Resource"]}],"techniques":[{"id":"T1190","name":"Exploit Public-Facing Application","tactics":["initial-access"],"provenance":"source","basis":"ctid-kev","bases":["ctid-kev"],"basisDetail":"CTID Mappings Explorer KEV 07/28/2025 (ATT&CK 16.1); capability: Other","mappingType":"exploitation_technique","evidence":[],"comment":"This vulnerability allows an attacker to write arbitrary files to a known location on the target server, including potentially malicious files such as PHP scripts by leveraging the fact that Craft CMS creates session files for unauthenticated users at the login page. However, this vulnerability does not, by itself, cause any scripts to be executed or any information to be accessed, so it would need to be chained with another vulnerability in order to achieve code execution.","confidence":"medium","confidenceNote":"CTID KEV capability group \"other\" is generic"},{"id":"T1505.003","name":"Web Shell","tactics":["persistence"],"provenance":"source","basis":"ctid-kev","bases":["ctid-kev"],"basisDetail":"CTID Mappings Explorer KEV 07/28/2025 (ATT&CK 16.1); capability: Other","mappingType":"primary_impact","evidence":[],"comment":"This vulnerability allows an attacker to write arbitrary files to a known location on the target server, including potentially malicious files such as PHP scripts by leveraging the fact that Craft CMS creates session files for unauthenticated users at the login page. However, this vulnerability does not, by itself, cause any scripts to be executed or any information to be accessed, so it can only write files and would need to be chained with another vulnerability in order to achieve code execution.","confidence":"medium","confidenceNote":"CTID KEV capability group \"other\" is generic"},{"id":"T1059","name":"Command and Scripting Interpreter","tactics":["execution"],"provenance":"source","basis":"ctid-kev","bases":["ctid-kev"],"basisDetail":"CTID Mappings Explorer KEV 07/28/2025 (ATT&CK 16.1); capability: Other","mappingType":"secondary_impact","evidence":[],"comment":"This vulnerability allows an attacker to write arbitrary files to a known location on the target server, including potentially malicious files such as PHP scripts by leveraging the fact that Craft CMS creates session files for unauthenticated users at the login page. However, this vulnerability does not, by itself, cause any scripts to be executed or any information to be accessed, so it can only write files and would need to be chained with another vulnerability in order to achieve code execution.","confidence":"medium","confidenceNote":"CTID KEV capability group \"other\" is generic"}],"reports":[],"affected":[{"ecosystem":"Packagist","package":"craftcms/cms","vulnerableRanges":[">=5.0.0-alpha.1, <5.7.5","<4.15.3"],"patched":["5.7.5","4.15.3"],"from":["GHSA-7vrx-9684-xrf2"],"provenance":"source"}],"advisories":[{"id":"GHSA-7vrx-9684-xrf2","url":"https://github.com/advisories/GHSA-7vrx-9684-xrf2","severity":"MODERATE","ecosystem":"Packagist","package":"craftcms/cms","vulnerableRanges":[">=5.0.0-alpha.1, <5.7.5"],"patched":["5.7.5"],"provenance":"source","from":"GHSA"},{"id":"GHSA-7vrx-9684-xrf2","url":"https://github.com/advisories/GHSA-7vrx-9684-xrf2","severity":"MODERATE","ecosystem":"Packagist","package":"craftcms/cms","vulnerableRanges":["<4.15.3"],"patched":["4.15.3"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2025-13951","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-13951","exploited":true,"exploitedSince":"2025-06-02","provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[{"stage":"exploitation","techniques":["T1190"],"provenance":"source"},{"stage":"primary","techniques":["T1505.003"],"provenance":"source"},{"stage":"secondary","techniques":["T1059"],"provenance":"source"}],"timeline":[{"date":"2025-05-07","kind":"published","label":"Published (NVD)","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-35939","provenance":"source"},{"date":"2025-06-02","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json","provenance":"source"},{"date":"2025-06-02","kind":"kev","label":"Added to CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","provenance":"source"},{"date":"2025-06-02","kind":"euvd-exploited","label":"ENISA EUVD: exploited","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-13951","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":26},"priority":{"score":56.0,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in CISA KEV and VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 515 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":14.28,"detail":"percentile 0.7142"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":3.0,"detail":"50 pulses"},{"name":"CVSS severity","points":3.71,"detail":"base score 5.3"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-craft-cms-cve-2025-35939","children":[{"from":"CVE-2025-35939","to":"CVE-2026-31859","relation":"regression","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"regression","quote":"The fix for CVE-2025-35939 in craftcms/cms introduced a strip_tags() call in src/web/User.php to sanitize return URLs before they are stored in the session.","from":"CVE.org","in":"CVE-2026-31859"}]}],"packageHistory":[{"cve":"CVE-2025-23209","published":"2025-01-18","fixed":"5.5.8","kev":true},{"cve":"CVE-2025-46731","published":"2025-05-05","fixed":"5.6.15","kev":false},{"cve":"CVE-2025-32432","published":"2025-04-25","fixed":"5.6.17","kev":true,"link":{"from":"CVE-2025-32432","to":"CVE-2025-35939","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:craftcms/cms","fromFixed":"4.14.15","toFixed":"4.15.3","daysApart":12},{"kind":"version-step","provenance":"source","package":"Packagist:craftcms/cms","fromFixed":"5.6.17","toFixed":"5.7.5","daysApart":12}]}},{"cve":"CVE-2025-35939","published":"2025-05-07","fixed":"5.7.5","kev":true},{"cve":"CVE-2025-54417","published":"2025-08-09","fixed":"5.8.4","kev":false,"link":{"from":"CVE-2025-35939","to":"CVE-2025-54417","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:craftcms/cms","fromFixed":"4.15.3","toFixed":"4.16.3","daysApart":94},{"kind":"version-step","provenance":"source","package":"Packagist:craftcms/cms","fromFixed":"5.7.5","toFixed":"5.8.4","daysApart":94}]}},{"cve":"CVE-2025-57811","published":"2025-08-25","fixed":"5.8.7","kev":false},{"cve":"CVE-2025-68436","published":"2026-01-05","fixed":"5.8.21","kev":false}],"package":"Packagist:craftcms/cms"}}