CVE-2019-9891

The function getopt_simple as described in Advanced Bash Scripting Guide (ISBN 978-1435752184) allows privilege escalation and execution of commands when used…

published May 31, 2019

CVSS
—
EPSS
3%
Percentile
88.7
In the wild
Unconfirmed
What it is

⚠️ A shell script using `getopt_simple` could turn your privileges into an all-access pass without breaking a sweat! Think of this like a restaurant where a diner can sneak into the kitchen just by ordering off the menu—they can start cooking whatever they want without anyone checking their credentials. This vulnerability allows an attacker to escalate their privileges, which means they could execute any command within the shell script's context. The consequences could be severe, potentially leading to data leaks or system compromise if exploited by a malicious user.

Put simply

Think of this like a restaurant where a diner can sneak into the kitchen just by ordering off the menu—they can start cooking whatever they want without anyone checking their credentials. The flaw resides in the `getopt_simple` function within the Advanced Bash Scripting Guide; it improperly handles user input when executed via `sudo`, enabling privilege escalation through crafted commands.

What to do

This vulnerability allows an attacker to escalate their privileges, which means they could execute any command within the shell script's context. The consequences could be severe, potentially leading to data leaks or system compromise if exploited by a malicious user. To mitigate this, review any scripts using `getopt_simple` and limit their execution context. Ensure that you validate user inputs and consider refactoring scripts to avoid using this function directly. Always test your scripts in a safe environment first! You’ve got this! With a little attention, you can tighten up your scripts and keep things secure. 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.03390 · 88.7th percentile
Published
2019-05-31T20:42Z
EPSS history
Timeline
  • 31 MAY 20:42Z
    The function getopt_simple as described in Advanced Bash Scripting Guide (ISBN 978-1435752184) allows privilege escalation and execution of commands when used…
    cvelistv5