Description
phpMyFAQ before 4.1.2 contains a stored cross-site scripting vulnerability in SvgSanitizer::decodeAllEntities() that limits recursive entity decoding to 5 iterations, allowing attackers to bypass sanitization. Authenticated users with FAQ_EDIT permission can upload malicious SVG files with deeply nested ampersand encoding around numeric HTML entities to reconstruct javascript: URLs, which execute arbitrary JavaScript when clicked by other users viewing the uploaded SVG.
Problem types
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Product status
Any version before 4.1.2
4.1.2 (semver)
Credits
offset
References
github.com/...pMyFAQ/security/advisories/GHSA-whqh-9pq5-c7r3
github.com/...pMyFAQ/security/advisories/GHSA-whqh-9pq5-c7r3 (GHSA Advisory GHSA-whqh-9pq5-c7r3)
www.vulncheck.com/...ing-depth-limit-bypass-in-svg-sanitizer (VulnCheck Advisory: phpMyFAQ - Stored XSS via Entity Decoding Depth Limit Bypass in SVG Sanitizer)