phpMyFAQ - Stored XSS via Entity Decoding Depth Limit Bypass in SVG Sanitizer
thorsten phpmyfaq
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| phpmyfaq/phpmyfaq Packagist |
|
|
| thorsten/phpmyfaq Packagist |
|
|
thorsten phpmyfaq
| Product | Affected | Fixed in |
|---|---|---|
| phpmyfaq/phpmyfaq Packagist |
|
|
| thorsten/phpmyfaq Packagist |
|
|
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.
From the CVE record · VulnCheck
phpMyFAQ before 4.1.2 does not fully decode deeply nested entities when sanitizing SVG files. An authenticated user with FAQ_EDIT permission can upload a malicious SVG that runs JavaScript when another user clicks a crafted link in it.
Anyone running Packagist packages phpmyfaq/phpmyfaq or thorsten/phpmyfaq before 4.1.2 should check their installation.