AVideo vulnerable to Stored XSS via html_entity_decode() Reversing xss_esc() Sanitization in Channel About Field
Date: 2026-03
Affected: composer/wwbn/avideo
Attack vector: xss
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2026-33683
CWE: CWE-79
CVSS: 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)

## Summary A sanitization order-of-operations flaw in the user profile "about" field allows any registered user to inject arbitrary JavaScript that executes when other users visit their channel page. The `xss_esc()` function entity-encodes input before `strip_specific_tags()` can match dangerous HTML tags, and `html_entity_decode()` on output reverses the encoding, restoring the raw malicious HTML. ## Details **Input sanitization** in `objects/user.php:156`: ```php public function setAbout($about) { $this->about = strip_specific_tags(xss_esc($about)); } ``` The call order is `strip_specific_tags(xss_esc($about))`. The inner `xss_esc()` function (`objects/functionsSecurity.php:233`) calls `htmlspecialchars()`: ```php $result = @htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); ``` This encodes `<script>alert(1)</script>` to `&lt;script&gt;alert(1)&lt;/script&gt;`. Then `strip_specific_tags()` (`objects/functions.php:6623-6636`) runs regex patterns to remove dangerous tags: ```php $string = preg_replace('/<' . $tag . '[^>]*>(.*?)<\/' . $tag . '>/s', $replacement, $string); ``` But the regex looks for literal `<script>` — it can never match the entity-encoded `&lt;script&gt;`. The sanitizer is completely neutralized by the encoding that precedes it. **Output** in `view/channelBody.php:239-246`: ```php $about = html_entity_decode($user->getAbout()); if (!empty($advancedCustomUser->showAllAboutTextOnChannel)) { echo $about; } else { ?> <div id="aboutAreaPreCont


Mitigations:

Architectural layers (MAESTRO):