Skip to content
RCE Write-up Advanced

(CVE-2021-0255) Juniper Junos OS Local Privilege Escalation vulnerability in ethtraceroute

A setuid binary on Junos OS, ethtraceroute, could be abused by a local user to run commands with root privileges. An attacker with a low-privileged account on the device could therefore escalate to root and disclose sensitive information or execute arbitrary commands.

starlabs.sg

Published on starlabs.sg

On the Juniper OS, there are a few binaries that have the setuid permission bit enabled. These binaries will run as the owner of the executable (typically as “root”) and inherit their privileges.

The author, on starlabs.sg

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a setuid binary (ethtraceroute) that runs as root without properly restricting what a low-privileged caller can make it do.

Impact

A local user on the device could escalate to root, potentially disclosing sensitive information or executing arbitrary commands as root.

What the attacker needed

Local access to the Junos device; a low-privileged account

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Some programs on a system are marked so that they always run with the full powers of the superuser (root), even when a normal user starts them. If such a program can be tricked into running other commands, a normal user can borrow those root powers. Here the ethtraceroute program on Juniper's Junos operating system had this weakness, letting a local user act as root.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.