Summary
AVideo's CustomizeUser plugin stores the field_name parameter without adequate sanitization, allowing persistent cross-site scripting content to be saved through the plugin's JSON endpoint.
When an administrator or other user views affected extra-information pages or profile forms, the stored script may execute in their browser, potentially compromising sessions or altering displayed content.
Affected context
The vulnerability occurs in AVideo deployments using the CustomizeUser plugin when the field_name value supplied to add.json.php is stored as trusted content. Risk depends on whether an attacker can submit or influence this value and whether affected profile forms or extra-information pages later render it through the typeToHTML function without context-appropriate output encoding.
Exploit preconditions
- Attack surface: The CustomizeUser plugin's
add.json.phpendpoint and pages that render configured extra information - Required access: Access sufficient to submit or modify CustomizeUser field data; the exact requirement depends on deployment permissions
- Trigger point: A vulnerable page or profile form displays the stored value through the affected rendering path
- Why exploitation is possible: User-controlled content is persisted without adequate sanitization and is later inserted into an HTML-rendering context
Why this happens
The underlying issue is a failure to treat the field_name parameter as untrusted input before storing and rendering it. Persisting raw content and later passing it through an HTML-generating function creates a stored cross-site scripting condition, mapping to CWE-79: Improper Neutralization of Input During Web Page Generation. The insecure pattern is a mismatch between input trust assumptions and the output context, rather than a one-time reflected response.
Potential impact
- An attacker may execute script in the browser of a user viewing affected content
- User sessions or browser-accessible data could be exposed
- An attacker could alter page content or impersonate application actions within the victim's session
- Administrative workflows could be disrupted or used to spread malicious content
General mitigation guidance
Mitigation generally focuses on reducing trust in submitted field values and ensuring every output is safe for its actual rendering context.
Common defensive patterns include:
- Applying allowlist-based validation to field names and permitted field types
- Encoding output for the specific HTML, attribute, or script context before rendering
- Avoiding raw HTML generation for user-controlled values where structured rendering is sufficient
- Enforcing authorization checks on configuration and profile-field modification endpoints
- Using browser security controls such as an appropriately restrictive Content Security Policy
- Limiting administrative privileges and separating content-management permissions from broader system administration
How teams detect issues like this
Detection approaches can include:
- Static analysis rules for raw request parameters flowing into persistence and HTML-rendering functions
- Code review checks for missing context-aware output encoding in
typeToHTMLand related templates - Tests that submit representative untrusted values and verify that rendered output remains inert
- Web-application policies that monitor unexpected script-bearing content in profile or custom-field data
- Automated security review tools that identify stored input flows reaching browser-executable contexts

