Skip to content
DoS Write-up Intermediate

CVE-2020-28243 (2) SaltStack Minion Denial of Service via Argument Injection

An incomplete fix for a previous command injection vulnerability in SaltStack's Salt allowed argument injection through crafted package names, enabling a local denial of service by making package listing commands hang. The attacker could cause the restartcheck process to hang indefinitely by injecting arguments that force it to read from a FIFO file.

sec.stealthcopter.com

Published on sec.stealthcopter.com

Recently I disclosed a local privilege escalation, CVE-2020-28243, in SaltStack’s Salt via specially crafted process names. However, due to an incomplete fix, argument injection leading to a low impact denial of service is still possible.

The author, on sec.stealthcopter.com

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 the fix used shlex.split on a concatenated command string, which still allowed spaces in the package name to be interpreted as separate arguments, enabling argument injection.

Impact

A local attacker could cause a denial of service by making the restartcheck process hang, though the master and minion are not impacted.

What the attacker needed

Local access to the minion; ability to create a FIFO file; restartcheck triggered by master

The fix

The fix was to build the command as an array and append the package name as a single argument, and to add '--' to end options, preventing argument injection.

How it was found

  1. Create a FIFO file at /tmp/status using mkfifo.
  2. Run the exploit script with the crafted package name containing the argument injection.
  3. The restartcheck process reads from the FIFO and hangs indefinitely.

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.

SaltStack is a tool for managing many computers. A previous security fix tried to stop attackers from running their own commands by cleaning up package names, but it missed a way to sneak in extra options (arguments) to a system command. This let an attacker make a background check hang forever, which is a denial of service.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.