Skip to main content

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CVE-2026-45578

Severity High
Score 8.8/10

Summary

Classic shell-metacharacter injection. The YPTSocket notification branch in plugin/Live/on_publish.php builds an execAsync() command line by string concatenation, single-quoting each argument but never calling escapeshellarg(). A ' in any of the three interpolated values ($users_id, $m3u8, $obj->liveTransmitionHistory_id) closes the quoted token and lets the attacker append arbitrary commands. File: plugin/Live/on_publish.php, line 267. Root cause: the developer wrapped each variable in literal single quotes ('$users_id', '$m3u8', '$obj->liveTransmitionHistory_id') believing this provides shell-quoting. PHP single-quoted-into-shell is not safe quoting; it is just two literal quote characters that the shell pairs greedily. Any embedded ' closes the outer string and resumes interpretation in the shell. The rest of the AVideo codebase already calls escapeshellarg() (137 call sites across the project) for ffmpeg invocations, so the safe primitive is well-known to the project; it was simply omitted from this branch. The endpoint is web-reachable (no .htaccess rule restricts on_publish.php, no REMOTE_ADDR check), so the trigger is a direct HTTP POST without going through nginx-rtmp.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • LOW
  • HIGH
  • HIGH

CWE-78 - OS Command Injection

The OS command injection weakness (also known as shell injection) is a vulnerability which enables an attacker to run arbitrary OS commands on a server. This is done by modifying the intended downstream OS command and injecting arbitrary commands, enabling the execution of unauthorized OS commands. This has the potential to fully compromise the application along with all of its data, and, if the compromised process does not follow the principle of least privileges, it may compromise other parts of the hosting infrastructure as well. This weakness is listed as number ten in the 'CWE Top 25 Most Dangerous Software Weaknesses'.

References

Advisory Timeline

  • Published