Summary
A critical stored cross-site scripting vulnerability in AVideo's AD_Server plugin allows unauthenticated attackers to submit HTML through the log.php label parameter. Because the value is stored and later rendered without adequate sanitization in the administrator's Ad Types report, arbitrary JavaScript may execute in an administrator's browser session.
Affected context
The vulnerability occurs in AVideo deployments using the AD_Server plugin and its log.php endpoint. It becomes risky when attacker-controlled label data is accepted without output encoding, stored for later use, and rendered in the administrative Ad Types report through an HTML-rendering sink such as jQuery .html(). The issue can affect administrators who view the contaminated report.
Exploit preconditions
- Attack surface: The AD_Server plugin's log.php endpoint
- Required access: No authentication is generally required to submit the attacker-controlled label value
- Trigger point: An administrator views the Ad Types report containing the stored value
- Why exploitation is possible: The label is stored without sufficient escaping and later inserted into the page as HTML, allowing browser script execution in the report viewer's security context
Why this happens
The underlying bug is a failure to establish a consistent trust boundary for user-controlled data. The application stores the label parameter without applying context-appropriate validation or encoding, then passes it to a client-side HTML insertion operation rather than treating it as text. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.
Potential impact
- Arbitrary JavaScript may execute in an administrator's browser session
- Administrative actions could be performed without the administrator's intent
- Sensitive information available to the administrator may be exposed
- Session or account compromise could occur depending on browser and application controls
- Malicious content could be used to alter the appearance or behavior of administrative pages
General mitigation guidance
Mitigation generally focuses on treating all request parameters as untrusted and preserving their text semantics throughout storage and display.
Common defensive patterns include:
- Applying context-appropriate output encoding when values are inserted into HTML
- Using text-oriented DOM APIs and secure-by-default templating instead of raw HTML insertion
- Validating stored fields against an appropriate allowlist where business requirements permit
- Applying sanitization only when rich text is explicitly required, using a narrowly configured, well-maintained sanitizer
- Enforcing protective browser policies such as an effective Content Security Policy
- Limiting administrative privileges and reducing the sensitive actions available to browser sessions
- Separating untrusted content from privileged administrative interfaces where practical
How teams detect issues like this
Detection can combine static analysis, code review, and runtime controls.
- Search for request parameters that flow into storage and later reach HTML sinks such as jQuery .html(), innerHTML, or equivalent template operations.
- Review whether output encoding is performed at the final rendering context rather than assumed to have occurred during input handling or storage.
- Add static-analysis or automated code-review rules for untrusted data reaching HTML-rendering APIs without a recognized sanitizer or encoder.
- Use policy checks to require safe DOM APIs, contextual encoding, and security review for administrative reports that display user-controlled values.
- Test administrative views with benign marker data and verify that stored values are rendered as text rather than interpreted as markup.

