Summary
AVideo contains a stored cross-site scripting vulnerability in the LoginControl plugin because PGP public keys are inserted into a textarea without proper HTML encoding. An authenticated attacker who submits a crafted public key may execute JavaScript in an administrator's browser when the administrator views the user's profile.
Affected context
The vulnerability occurs in AVideo deployments using the LoginControl plugin when user-provided PGP public keys are displayed in the administrator-facing profile tab. Risk exists when the key value is rendered into HTML without context-appropriate output encoding and an attacker can create or modify a user profile.
Exploit preconditions
- Attack surface: Authenticated user-profile input and the administrator-facing profile interface
- Required access: An authenticated account with permission to submit or modify a PGP public key
- Trigger point: An administrator views the affected user's profile tab
- Why exploitation is possible: The submitted value is stored and later rendered in a textarea without adequate HTML encoding, allowing browser-interpreted markup or script content to reach an administrator's session
Why this happens
The underlying bug is a failure to apply context-aware output encoding to attacker-controlled data before embedding it in an HTML textarea element. This is a stored cross-site scripting condition mapped to CWE-79: Improper Neutralization of Input During Web Page Generation, because untrusted profile data is treated as safe HTML rather than encoded for its output context.
Potential impact
- An attacker may execute JavaScript in an administrator's browser
- An attacker could perform actions using the administrator's active session
- Sensitive information visible to the administrator may be exposed
- Administrative settings or user records could be changed
- The vulnerability may support account compromise or broader application abuse
General mitigation guidance
Mitigation generally focuses on treating PGP public keys and all profile fields as untrusted data throughout their lifecycle.
Common defensive patterns include:
- Applying context-appropriate HTML encoding when values are rendered in textarea elements
- Using framework templating features that escape output by default
- Avoiding raw HTML insertion for user-controlled values
- Validating public-key input against an appropriate format without relying on validation as a substitute for encoding
- Applying restrictive Content Security Policy controls as defense in depth
- Limiting administrative privileges and reducing the impact of actions available through administrator sessions
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis rules for unescaped variables in HTML templates and response construction
- Code review checks for raw HTML insertion and unsafe template rendering
- Tests that submit markup-like values in profile fields and verify they are rendered inert
- Dynamic scanning of authenticated administrative views using benign XSS test markers
- Policy enforcement requiring output encoding for every user-controlled value and its specific rendering context
- Automated review tools that flag unsanitized data flows from profile input to HTML output

