CVE Explorer
CVE-2026-31859
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 att
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
1
Preserved source conflicts
No provider value was silently selected as the winner.
cwe · 2 assertions
{"cweId":"CWE-116","description":"CWE-116: Improper Encoding or Escaping of Output","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:57cc5a3d40e4e8848f51f4f43ac0ffdf927972aea1c21f1750f4011d4fc51827 · sha256:6a787b6d615c0c52… · /containers/cna/problemTypes/1/descriptions/0
{"cweId":"CWE-79","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:57cc5a3d40e4e8848f51f4f43ac0ffdf927972aea1c21f1750f4011d4fc51827 · sha256:6a787b6d615c0c52… · /containers/cna/problemTypes/0/descriptions/0
Affected products and versions
1 source assertion{"product":"cms","vendor":"craftcms","versions":[{"status":"affected","version":">= 4.15.3, < 4.17.3"},{"status":"affected","version":">= 5.7.5, < 5.9.7"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:57cc5a3d40e4e8848f51f4f43ac0ffdf927972aea1c21f1750f4011d4fc51827 · sha256:6a787b6d615c0c52… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":6.9,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"LOW","subIntegrityImpact":"LOW","userInteraction":"NONE","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE"},"metric_type":"cvssV4_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:57cc5a3d40e4e8848f51f4f43ac0ffdf927972aea1c21f1750f4011d4fc51827 · sha256:6a787b6d615c0c52… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
2 source assertions{"cweId":"CWE-116","description":"CWE-116: Improper Encoding or Escaping of Output","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:57cc5a3d40e4e8848f51f4f43ac0ffdf927972aea1c21f1750f4011d4fc51827 · sha256:6a787b6d615c0c52… · /containers/cna/problemTypes/1/descriptions/0
{"cweId":"CWE-79","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:57cc5a3d40e4e8848f51f4f43ac0ffdf927972aea1c21f1750f4011d4fc51827 · sha256:6a787b6d615c0c52… · /containers/cna/problemTypes/0/descriptions/0
Source references
1 source assertion{"name":"https://github.com/craftcms/cms/security/advisories/GHSA-fvwq-45qv-xvhv","tags":["x_refsource_CONFIRM"],"url":"https://github.com/craftcms/cms/security/advisories/GHSA-fvwq-45qv-xvhv"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:57cc5a3d40e4e8848f51f4f43ac0ffdf927972aea1c21f1750f4011d4fc51827 · sha256:6a787b6d615c0c52… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.