Juniper PTX routers allow unauthenticated root RCE via On-Box Anomaly Detection API
An unauthenticated attacker can execute arbitrary commands as root on Juniper PTX devices by sending crafted requests to the On-Box Anomaly Detection service listening on port 8160.
Security & privacy watchTowr Labs 3 Mar 2026 Disclosure Prototype evidence
Published as “Sometimes, You Can Just Feel The Security In The Design (Juniper Junos Evolved CVE-2026-21902 Pre-Auth RCE)”
Why it matters
Network operators must patch or restrict the On-Box Anomaly Detection service to prevent unauthenticated root compromise.
Summary
The researchers examined a Juniper PTX router running Junos OS Evolved and discovered that the On-Box Anomaly Detection Framework listens on 0.0.0.0:8160, exposing a REST API. By creating a command object of type RE-SHELL and scheduling it through the API, the service passes the command string directly to subprocess.run, resulting in root-level code execution. They provide a step-by-step PoC and release a detection DAG, confirming the vulnerability on a real device.
What they found 2
- The On-Box Anomaly Detection Framework is exposed on all interfaces (0.0.0.0) on port 8160
“As we can see, our On-Box Anomaly Detection Framework is listening on 8160/TCP and supposedly bound to 0.0.0.0”
- The command syntax is executed without sanitization via subprocess.run
“The syntax value [6] is passed directly intosubprocess.run(command, ...)”
Caveats 1
- We accept however, that our environment may be ‘abnormal’ and so we’re giving Juniper some benefit of doubt here.
What’s new here 4
- Identified that the Anomaly Detection service binds to all interfaces instead of internal only
- Demonstrated command injection via the RE-SHELL command type
- Published a full PoC workflow creating commands, DAGs, and committing them to trigger RCE
- Released a detection artifact generator (DAG) for community use