Skip to content
Access control Write-up Intermediate

(CVE-2021-0204) Juniper Junos OS Local Privilege Escalation vulnerability in dexp

A setuid binary on Junos OS, dexp, could be abused by a local user to run commands as root. An attacker with a low-privileged account could therefore escalate privileges 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 (dexp) that does not safely control what it executes, allowing a local user to run commands with root privileges.

Impact

A local attacker could escalate to root and then disclose sensitive information or execute arbitrary commands.

What the attacker needed

Local access to the 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 their owner, usually the administrator account called root. If such a program can be tricked into running other commands, a normal user can borrow those powers. Here the program called dexp was one of those, so a logged-in user could become root.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.