Summary
A code injection vulnerability in the WebSocket API of AV Stumpfl Pixera Two Media Server up to version 25.2 R2 allows crafted data sent over the API to be interpreted as executable code.
When exposed to untrusted clients or integrated with insecure automation, this flaw can let a remote attacker execute arbitrary code in the media server context.
Affected context
The vulnerability resides in the WebSocket API interface of AV Stumpfl Pixera Two Media Server in versions up to 25.2 R2.
It is relevant in deployments where:
- The WebSocket API is enabled and accessible over the network
- External tools, scripts, or control systems send commands or data via WebSocket
- Incoming messages are processed with insufficient validation before being interpreted or executed
Environments that expose this API beyond a tightly controlled network or allow semi-trusted clients to connect are more likely to be at risk.
Exploit preconditions
- Attack surface: Network-accessible WebSocket endpoint exposed by the Pixera Two Media Server.
- Required access: Ability to establish a WebSocket connection to the server (e.g., from the same network segment or any reachable interface).
- Trigger point: Sending specially crafted messages over the WebSocket API that are processed by the vulnerable function.
- Why exploitation is possible: The server logic treats user-controlled WebSocket message content as code or command input, combining it into execution contexts without sufficient sanitization or strict separation between data and executable instructions (CWE-94/CWE-74).
Why this happens
The root cause is the improper handling of user-controlled input within the WebSocket API, where incoming messages are incorporated into commands, scripts, or evaluable expressions without adequate validation or neutralization.
This aligns with CWE-94: Improper Control of Generation of Code, when application logic dynamically builds or executes code from external data, and CWE-74: Improper Neutralization of Special Elements in Output, where control characters or meta-syntax are not correctly escaped.
Abstractly, the bug pattern is: a server-side component accepts text from a network client, embeds it into a code or command context (such as scripting hooks, configuration expressions, or dynamic execution mechanisms), and executes it in the application environment, thereby allowing an attacker to influence program behavior beyond intended input boundaries.
Potential impact
- Remote execution of arbitrary commands or code within the media server process context
- Unauthorized control of show playback, media scheduling, or device automation integrated with the server
- Manipulation or disruption of live productions, including forced shutdown or display of unintended content
- Use of the media server as a foothold for lateral movement within the controlling network
- Exfiltration or tampering of configuration data and control scripts handled by the WebSocket API
General mitigation guidance
Effective mitigations typically focus on eliminating dynamic execution of untrusted input and enforcing strict separation between commands and data:
- Avoid constructing executable code, scripts, or commands directly from WebSocket message content; use well-defined command schemas or structured messages instead.
- Apply strict input validation for WebSocket messages, accepting only known, typed fields and rejecting or ignoring unexpected or malformed data.
- Neutralize or escape special characters and meta-syntax before including user-controlled values in any output that may be parsed or executed.
- Introduce server-side authorization and origin checks for WebSocket connections, limiting which clients can invoke sensitive operations.
- Run the media server and associated control services with least-privilege OS and network permissions to limit blast radius if code is executed.
- Segment networks so that the WebSocket interface is reachable only from trusted control systems rather than arbitrary clients.
How teams detect issues like this
Organizations can detect and monitor this class of issue using a combination of code-centric and operational approaches:
- Static analysis: Configure rules to flag use of dynamic evaluation functions, embedded scripting engines, or command construction logic that concatenates user input from WebSocket handlers.
- Code review: Examine WebSocket handling code for patterns where message payloads are transformed into code, scripts, or shell commands, especially in areas labeled as "scripting," "automation," or "remote control."
- Input/output tracing: Instrument server logging to capture WebSocket commands and resulting actions, looking for anomalous or overly flexible command patterns.
- Runtime monitoring: Use application firewalls or API gateways capable of inspecting WebSocket traffic and enforcing schemas, alerting on unexpected fields or payload structures.
- Policy enforcement: Establish internal guidelines that disallow dynamic code generation from external input and require secure wrappers for any scripting integration.

