Summary
WWBN AVideo contains a stored cross-site scripting vulnerability in category names and icon class values, which are saved without adequate sanitization and later rendered in pages.
When category creation is enabled, an authenticated user with upload permission may store JavaScript that executes in the browser of visitors viewing affected watch pages or gallery entries, potentially using their active sessions.
Affected context
The issue occurs in AVideo installations where users can create categories and have permission to upload content. Category values submitted through the category creation endpoint may later be rendered as HTML text or within a CSS class attribute on watch pages and Gallery cards. Risk depends on whether an attacker can create or modify categories and whether other users, including administrators, view content assigned to those categories.
Exploit preconditions
- Attack surface: Authenticated category creation and subsequent category rendering in watch or gallery views
- Required access: An authenticated account with
canUploadpermission, together with the ability to create categories whenusersCanCreateNewCategoriesis enabled - Trigger point: A victim views a video or gallery entry associated with the attacker-controlled category
- Why exploitation is possible: Category name and icon class values are stored without sufficient output-safe encoding before being inserted into HTML contexts
Why this happens
The vulnerability is an instance of CWE-79: Improper Neutralization of Input During Web Page Generation. Category fields are treated as trusted data after submission, even though their values can be controlled by users. The application stores these values with insufficient sanitization and later interpolates them into HTML text and attribute contexts without applying context-appropriate output encoding, allowing browser-interpreted script content to persist.
Potential impact
- Malicious script may execute in the browsers of users viewing affected content
- An attacker could perform actions using the victim's authenticated session
- Administrative users may be targeted when reviewing watch pages or gallery entries
- Sensitive page data or interface content could be exposed to injected script
- The vulnerability could support account or application workflow abuse, depending on available permissions
General mitigation guidance
Mitigation generally focuses on treating category fields as untrusted data throughout their lifecycle.
Common defensive patterns include:
- Applying context-aware output encoding whenever category values are rendered in HTML text or attributes
- Allowing only a strict, predefined character set for fields such as icon classes
- Using server-side validation and safe templating mechanisms rather than string-based HTML construction
- Restricting category creation to the minimum necessary user population
- Applying least privilege to self-registered and upload-capable accounts
- Using a restrictive Content Security Policy as an additional defense-in-depth control
These measures reduce the chance that stored user input is interpreted as executable browser content.
How teams detect issues like this
Organizations can look for stored XSS risks through:
- Static analysis rules identifying user-controlled values inserted into HTML or attribute contexts
- Code review checks for missing context-sensitive escaping in templates and PHP output paths
- Tests that submit markup-like values through category fields and verify safe rendering
- Inventory and policy enforcement for endpoints that permit user-generated metadata
- Monitoring for unusual category values, unexpected markup, or script-like content in stored records
Neutral automated security review tools can help identify unsafe data flows, but findings should be confirmed against the actual rendering context.

