CVE-2026-31859
March 11, 2026
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.
Affected Packages
https://github.com/craftcms/cms.git (GITHUB):
Affected version(s) >=5.7.5 <5.9.7Fix Suggestion:
Update to version 5.9.7https://github.com/craftcms/cms.git (GITHUB):
Affected version(s) >=4.15.3 <4.17.3Fix Suggestion:
Update to version 4.17.3craftcms/cms (PHP):
Affected version(s) >=5.7.5 <5.9.7Fix Suggestion:
Update to version 5.9.7craftcms/cms (PHP):
Affected version(s) >=4.15.3 <4.17.3Fix Suggestion:
Update to version 4.17.3Related ResourcesĀ (4)
Do you need more information?
Contact UsCVSS v4
Base Score:
6.9
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
NONE
Subsequent System Confidentiality
LOW
Subsequent System Integrity
LOW
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.2
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Weakness Type (CWE)
EPSS
Base Score:
0.05