Skip to content
RCE Write-up Advanced

Someone Knows Bash Far Too Well, And We Love It (Ivanti EPMM Pre-Auth RCEs CVE-2026-1281 & CVE-2026-1340)

Two pre-authentication remote command execution vulnerabilities existed in Ivanti EPMM because Apache RewriteMap directives passed attacker-controlled HTTP request data to Bash scripts, which used arithmetic expansion on unsanitised input. An unauthenticated attacker could execute arbitrary OS commands on the server.

Piotr Bazydło Follow

Published on labs.watchtowr.com

This research is a glimpse into the capability powering the watchTowr Platform, a Preemptive Exposure Management solution. We enable organizations to autonomously validate and mitigate their exposure to emerging threats, ahead of in-the-wild exploitation.

Piotr Bazydlo (@chudyPB), on labs.watchtowr.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 Bash script assigned attacker-controlled input to a variable (gStartTime) that was later used in an arithmetic comparison, and Bash's arithmetic expansion evaluated a command substitution embedded in another variable's name.

Impact

An unauthenticated attacker could execute arbitrary OS commands on the Ivanti EPMM server, and the vulnerabilities were actively exploited in the wild.

What the attacker needed

Network access to the EPMM web interface; no authentication required

The fix

Ivanti replaced the vulnerable Bash scripts with Java classes via an RPM patch, but the patch must be reapplied after future changes until a permanent release in Q1 2026.

How it was found

  1. Send an HTTP request to the app store endpoint with a crafted st parameter and an h parameter containing a variable name with a command substitution.
  2. The Apache RewriteMap passes the request parts to the map-appstore-url Bash script.
  3. The script parses key=value pairs and assigns the st value to gStartTime.
  4. The script later performs an arithmetic comparison using gStartTime, triggering Bash arithmetic expansion.
  5. The expansion resolves the variable name from the h parameter, executing the embedded command.

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.

Ivanti EPMM is software that helps companies manage mobile phones. A part of it used a small Bash script to serve app downloads, and that script took values from the web request and used them in a maths comparison. Bash can run commands when it evaluates certain maths expressions, so an attacker could sneak a command into a request and have the server run it without logging in.

What is RCE?

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

More by Piotr Bazydło

View all

37 more disclosed reports, best first.

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.