{"id":"CVE-2026-31859","aliases":["GHSA-fvwq-45qv-xvhv"],"url":"https://o3.security/vulnerability/CVE-2026-31859","summary":"Craft has Reflective XSS via incomplete return URL sanitization","details":"Craft is a content management system (CMS). 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. However, strip_tags() only removes HTML tags (angle brackets) -- it does not inspect or filter URL schemes. Payloads like javascript:alert(document.cookie) contain no HTML tags and pass through strip_tags() completely unmodified, enabling reflected XSS when the return URL is rendered in an href attribute. This vulnerability is fixed in  5.9.7 and 4.17.3.","published":"2026-03-11T17:37:19.065Z","modified":"2026-08-07T11:31:09.152888183Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"craftcms/cms","fixedVersion":"4.17.3"},{"ecosystem":"Packagist","name":"craftcms/cms","fixedVersion":"5.9.7"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31859.json"},{"type":"ADVISORY","url":"https://github.com/craftcms/cms/security/advisories/GHSA-fvwq-45qv-xvhv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31859"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-07T11:31:09.152888183Z"}}