Summary
A cross-site scripting vulnerability in WWBN AVideo's default node socket server allows an unauthenticated attacker to relay autoEvalCodeOnHTML without the intended PHP-only filter. If an administrator's browser processes the relayed message, client-side code execution could lead to account takeover.
Affected context
The issue is in the default node socket server in WWBN AVideo through commit c3edcc274c389816d434acadac07ee78eaf330c1. The server relays autoEvalCodeOnHTML without applying the PHP-only filter. Risk depends on an administrator's browser processing the relayed content.
Exploit preconditions
- Attack surface: The default AVideo node socket server and connected client browsers
- Required access: The description indicates that an attacker does not need an authenticated account and can obtain an anonymous socket token
- Trigger point: A spoofed
MSG_BATCHmessage is relayed and processed by an administrator's browser - Why exploitation is possible: The relay does not apply the PHP-only filter, allowing content to reach a client-side
eval()path
Why this happens
The server relays content that can reach client-side eval() without the intended filtering. Treating relayed content as executable code rather than inert data creates a cross-site scripting risk, mapping to CWE-79: Improper Neutralization of Input During Web Page Generation.
Potential impact
- An administrator's browser may execute attacker-controlled code
- Attackers could potentially perform actions with the administrator's privileges
- Administrator accounts or associated application data could be compromised
General mitigation guidance
Mitigations generally focus on preventing untrusted content from becoming executable in clients.
- Treat socket messages as data and avoid dynamic evaluation of message content
- Apply strict allowlists and validation at trust boundaries, rather than relying on client-supplied labels or filters
- Use context-appropriate output encoding and safe rendering APIs
- Restrict socket access and token capabilities, and apply least privilege to administrative sessions
- Prefer secure-by-default message handling that rejects unexpected fields or message types
How teams detect issues like this
- Review socket relay and client message-handling code for paths from untrusted input to
eval()or equivalent execution APIs - Use static analysis to identify dynamic evaluation of socket, event, or batch message content
- Check that server-side filters and message schemas are consistently enforced before relaying data
- Apply policy checks in code review and CI to flag unsafe dynamic execution and overly permissive socket message handling

