{"id":"CVE-2026-126714","published":"2026-11-19T14:43:19Z","modified":"2026-11-22T00:13:05Z","title":"Partially overwritten session files can lead to remote code execution","vendor":"PHP","product":"PHP","tier":"tail","description":{"text":"Partially overwritten session files can lead to remote code execution.\n\nThe files session save handler, which is the default, writes updated session data into the existing session file without first clearing it. If a write is interrupted, the file can contain the beginning of the new session followed by the end of the old one, and bytes of an ordinary string can later be unserialized as objects. An attacker who can influence the session data, for example through session upload progress, and interrupt a write at a suitable point may inject objects, which can lead to code execution when the application contains a suitable gadget chain. Session data can also be corrupted.\n\nThis issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.2,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.13297,"percentile":0.96466,"provenance":"source"},"cwes":[{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"},{"id":"CWE-662","name":"Improper Synchronization"}],"references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-fm2m-fjf5-v3cp","tags":["vendor-advisory"]},{"url":"https://github.com/semgrep/detection-scripts/pull/14","tags":[]},{"url":"https://depthfirst.com/phpaftershell","tags":[]},{"url":"https://bugzilla.suse.com/show_bug.cgi?id=1290690","tags":[]},{"url":"https://ubuntu.com/security/CVE-2026-126714","tags":[]},{"url":"https://access.redhat.com/security/cve/cve-2026-126714","tags":[]}],"priority":{"score":30.7,"factors":[{"name":"EPSS percentile","points":19.29},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.44}]},"exploitSources":{"pocGithub":{"count":5,"skipped":1,"earliest":"2026-11-20","earliestUrl":"https://github.com/tani2shell/phpaftershell-lab","repos":[{"name":"tani2shell/phpaftershell-lab","url":"https://github.com/tani2shell/phpaftershell-lab","stars":2,"created":"2026-11-20"},{"name":"bimajunestifa/phpAfterShell","url":"https://github.com/bimajunestifa/phpAfterShell","stars":1,"created":"2026-11-20"},{"name":"ashrafzaryouh/CVE-2026-126714","url":"https://github.com/ashrafzaryouh/CVE-2026-126714","stars":0,"created":"2026-11-20"},{"name":"evenomn/cve-2026-126714-phpAfterShell","url":"https://github.com/evenomn/cve-2026-126714-phpAfterShell","stars":0,"created":"2026-11-20"},{"name":"VABISMO/PHPAfterShell-poc","url":"https://github.com/VABISMO/PHPAfterShell-poc","stars":0,"created":"2026-11-20"}]},"first":{"date":"2026-11-20","source":"PoC-in-GitHub","url":"https://github.com/tani2shell/phpaftershell-lab"},"provenance":"source"},"vendorSlug":"php","affectedVersions":[{"vendor":"PHP Group","product":"PHP","versions":["< 8.2.36",">= 8.3.0, < 8.3.37",">= 8.4.0, < 8.4.28",">= 8.5.0, < 8.5.13"]}],"capec":[{"id":"CAPEC-586","name":"Object Injection"}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-11-20T04:56:39.377795Z","from":"CISA ADP","provenance":"source"},"summary":{"text":"The files session save handler in PHP writes updated session data over the existing session file without first clearing it, so an interrupted write can leave a mix of new and old session content that later gets unserialized. An attacker with network access and no authentication or user interaction can influence session data, such as through session upload progress, and interrupt a write at a suitable point to inject objects, which can lead to code execution when the application contains a suitable gadget chain.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T04:02:15Z"},"euvd":{"id":"EUVD-2026-130158","exploited":false,"provenance":"source"}}