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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| thorsten | phpmyfaq | < 4.1.2 | 4.1.2 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | phpmyfaq/phpmyfaq | < 4.1.2 | 4.1.2 | GHSA-whqh-9pq5-c7r3 |
| Packagist | thorsten/phpmyfaq | < 4.1.2 | 4.1.2 | GHSA-whqh-9pq5-c7r3 |
References
- GitHub Security Advisory (GHSA-whqh-9pq5-c7r3) vendor-advisory
- VulnCheck Advisory: phpMyFAQ - Stored XSS via Entity Decoding Depth Limit Bypass in SVG Sanitizer third-party-advisory