Summary
AzuraCast contains a command injection vulnerability in StereoTool settings that can let a station user with Profile permission run operating-system commands. The risk arises when crafted setting values are passed to a shell during a station restart.
Affected context
The issue occurs in AzuraCast's handling of StereoTool configuration, specifically the stereo_tool_configuration_path and stereo_tool_license_key settings. It becomes risky when a user with Profile permission can set these values and the station is restarted, causing the values to be executed through /bin/sh.
Exploit preconditions
- Attack surface: StereoTool settings for an AzuraCast station
- Required access: Station user access with Profile permission sufficient to change the relevant settings
- Trigger point: Station restart, when the configured values are passed to
/bin/sh - Why exploitation is possible: Shell metacharacters in the settings can alter the intended command execution
Why this happens
The application uses user-controlled setting values in a shell command without safely separating data from command syntax. This is an OS command injection flaw, mapped to CWE-78: Improper Neutralization of Special Elements used in an OS Command. Shell metacharacters can therefore be interpreted as control syntax rather than ordinary input.
Potential impact
- An attacker could execute OS commands within the affected container
- The container's data or services may be compromised
- An attacker may disrupt station operations or access information available to the container
- Further impact could depend on the container's privileges and connectivity
General mitigation guidance
Common defensive patterns focus on avoiding shell interpretation of user-controlled values.
- Prefer APIs that pass arguments directly to a process without invoking a shell
- Where shell use cannot be avoided, strictly constrain accepted values and apply context-appropriate escaping
- Treat station settings as untrusted input, even when supplied by authenticated users
- Restrict the runtime's privileges and access to files, credentials, and other services
- Use secure-by-default configuration and limit which roles can change command-related settings
How teams detect issues like this
- Use static analysis to identify shell invocations that incorporate user-controlled settings
- Review code paths that build commands from StereoTool configuration values
- Apply policy checks to flag shell execution APIs and require safe argument handling
- Monitor station restart activity and investigate unexpected child processes or command execution in containers

