CVE-2019-14287: Sudo Bug Allows Restricted Users to Run Commands as Root
Sudo versions before 1.8.28 mishandled user IDs, allowing a user with sudo privileges to run commands as root even when the sudoers entry explicitly disallowed root access. An attacker with such privileges could bypass the restriction and execute commands as root.
sensorstechforum.com
Published on sensorstechforum.com
by Milena Dimitrova | Last Update: December 30, 2022 | 1 Comment
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, sudo did not properly validate the user ID when the Runas specification used ALL and then excluded root, allowing a negative user ID to be interpreted as root.
Impact
A user with sudo privileges could run commands as root, bypassing the intended restriction and gaining full control of the system.
What the attacker needed
Sudo privileges with ALL in Runas; sudo version before 1.8.28
The fix
The bug was fixed in sudo 1.8.28.
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.
Sudo lets a user run commands as another user, often as the all-powerful root. A configuration mistake meant that a user who was only supposed to act as non-root users could still act as root. This let them take full control of the system.
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.