{"id":"CVE-2026-115935","kind":"vulnerability","aliases":["CVE-2026-115935"],"related":[],"title":"Craft CMS: control panel users can overwrite the security key and run code","description":"The app/process-api-response-headers action accepts fake Craft API response headers from any authenticated control panel user.\n\n\n\nA non-admin user with only accessCp can place newline characters in X-Craft-Plugin-Licenses. Craft passes this value to its .env writer without removing the newlines.\n\n\n\nThis lets the user insert a new attacker-known CRAFT_SECURITY_KEY into .env. After Craft loads that key, the user can forge a signed login redirect containing a Twig system() callback.\n\n\n\nThis is different from the previous report. That report reads the existing key through a Twig sandbox bypass. This report replaces the key through fake API headers and CRLF injection. Fixing either source does not fix the other.","summary":"A Craft CMS control panel user with only accessCp permission can inject newline characters through a fake X-Craft-Plugin-Licenses API header, which writes an attacker-chosen CRAFT_SECURITY_KEY into the .env file. The attacker can then forge a signed login redirect that carries a Twig system() callback, which runs commands on the server.","severity":"high","cvss":8.8,"epss":0.00682,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["craft-cms","php","runtime","self-hosted"],"not_affected_if":["no-untrusted-cp-users"],"how_to_check":"- unknown","fix":"- unknown","status":"open","published_at":"2026-10-23T22:16:59+00:00","first_seen_at":"2026-10-23T23:44:51+00:00","triaged_at":"2026-10-25T02:59:57+00:00","updated_at":"2026-10-25T12:38:49+00:00","category":"runtime","confidence":0.6,"triage":{"at":"2026-10-25T02:59:57Z","model":"claude-haiku-5-5","output":{"fix":"- unknown","reach":"internet","title":"Craft CMS: control panel users can overwrite the security key and run code","impact":"high","summary":"A Craft CMS control panel user with only accessCp permission can inject newline characters through a fake X-Craft-Plugin-Licenses API header, which writes an attacker-chosen CRAFT_SECURITY_KEY into the .env file. The attacker can then forge a signed login redirect that carries a Twig system() callback, which runs commands on the server.","category":"runtime","nicknames":[],"who_cares":["craft-cms","php","self-hosted"],"confidence":0.6,"needs_auth":"yes","worst_case":"Attacker runs system commands on the server after control panel access","analyst_note":"Find the affected and fixed Craft CMS versions and the patch release from the NVD entry and Craft's security advisory; the sources give neither.","how_to_check":"- unknown","needs_analyst":true,"not_affected_if":["no-untrusted-cp-users"],"who_is_affected":"Sites running Craft CMS where non-admin users have the accessCp permission and can reach the control panel, so any control panel user with that role can exploit it. Sites where only trusted administrators can log into the control panel have a much smaller exposure, but the sources do not give affected version ranges. Sites that do not give control panel access to untrusted accounts can likely skip it, though the sources do not state this explicitly.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000604,"input_tokens":3434,"output_tokens":521,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-115935':16A,19A '-2026':15A,18A 'accept':89C 'accesscp':36B,108C 'action':88C 'admin':104C 'api':50B,92C,189C 'app/process-api-response-headers':87C 'attack':56B,66B,139C 'attacker-chosen':55B 'attacker-known':138C 'authent':97C 'bypass':181C 'callback':79B,163C 'carri':75B 'charact':41B,112C 'chosen':57B 'cms':2A,22B,30B 'code':13A 'command':82B 'contain':159C 'control':3A,31B,98C 'craft':1A,21B,29B,47B,58B,91C,116C,119C,141C,147C 'craft-cm':20B 'crlf':192C 'cve':14A,17A 'differ':166C 'either':195C 'env':63B,125C,145C 'exist':175C 'fake':44B,90C,188C 'file':64B 'fix':194C,199C 'forg':69B,154C 'header':51B,94C,190C 'host':27B 'inject':39B,193C 'insert':135C 'key':10A,60B,143C,150C,176C,186C 'known':140C 'let':132C 'licens':49B,118C 'load':148C 'login':72B,157C 'new':137C 'newlin':40B,111C,130C 'non':103C 'non-admin':102C 'overwrit':7A 'panel':4A,32B,99C 'pass':120C 'permiss':37B 'php':23B 'place':110C 'plugin':48B,117C 'previous':169C 'read':173C 'redirect':73B,158C 'remov':128C 'replac':184C 'report':170C,172C,183C 'respons':93C 'run':12A,81B 'runtim':24B 'sandbox':180C 'secur':9A,59B,142C 'self':26B 'self-host':25B 'server':85B 'sign':71B,156C 'sourc':196C 'system':78B,162C 'twig':77B,161C,179C 'user':5A,33B,100C,105C,134C,152C 'valu':122C 'without':127C 'write':53B 'writer':126C 'x':46B,115C 'x-craft-plugin-licens':45B,114C","nicknames":[],"mitigations":[],"who_affected":"Sites running Craft CMS where non-admin users have the accessCp permission and can reach the control panel, so any control panel user with that role can exploit it. Sites where only trusted administrators can log into the control panel have a much smaller exposure, but the sources do not give affected version ranges. Sites that do not give control panel access to untrusted accounts can likely skip it, though the sources do not state this explicitly.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-23T22:16:59+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"7004884b-51e2-48e8-b4a2-5ca29e80453e","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-115935","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115935","severity":null,"published_at":"2026-10-23T22:16:59+00:00","modified_at":"2026-10-23T22:16:59+00:00","first_seen_at":"2026-10-23T23:44:51+00:00","fetched_at":"2026-10-23T23:44:51+00:00","note":null},{"source":"epss","external_id":"CVE-2026-115935","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-115935","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-25T12:38:49+00:00","fetched_at":"2026-10-25T12:38:49+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}