Ivanti EPM Remote Code Execution
The Ivanti Endpoint Manager Cloud Appliance evaluated the value of a cookie as PHP code without validation, allowing remote code execution as a low-privileged user. An attacker could send a crafted cookie to the client.php page to execute arbitrary PHP code.
Published on machevalia.blog
Bug BountyWrite Ups
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.
Context
Ivanti Endpoint Manager (EPM) Cloud Appliance is a commercial product. In December 2021 Ivanti published a remote code execution vulnerability in the appliance in security advisory SA-2021-12-02. In March 2022 Synack Red Team members collaborated on a working exploit, which was later released on Twitter by @dinosyn.
The vulnerable feature is the /index/client.php page. According to the author's analysis, the application logic on that page performed an unsafe evaluation of the value of the c cookie, which resulted in remote code execution as the user "nobody", a low-privileged user.
Setup
The author captured a request to /index/client.php and replayed it from the Repeater tab. The tooling was BurpSuite, used to capture a request to /index/client.php and replay it from the Repeater tab. The author also relied on previously collected reconnaissance data: historical bounty data on targets, searched by page title.
Finding it
The author describes the vulnerability as very straightforward. The guess is that the code contained an unsafe-eval call on the cookie's value to validate authentication, probably along the lines of the following snippet, although the author would expect some sort of validation logic to be included:
{$_COOKIE['c'] .= ';';eval($_COOKIE['c']);exit;}
The PHP eval function evaluates the string value as PHP code. If an application uses eval without additional validation or sanitisation of user input passed to the eval string, remote code execution is possible.
Because the exploit was so simple, the author expected an extremely small window of opportunity to find bounties before duplicates appeared. The approach was to reuse existing reconnaissance data rather than scan again:
- A little reconnaissance on EPM instances that were easy to find on the internet via Google showed that the majority of the pages were titled "LANDesk(R) Cloud Services Appliance".
- The author ran through all existing data on bounty programs for page titles containing "LAN".
- This produced 12 targets without any additional reconnaissance.
- All 12 were still alive and all were vulnerable.
The lesson the author draws is to keep historical recon data on targets for exactly this kind of occasion.
Exploitation
Step 1: capture the vulnerable page
The author spun up BurpSuite and navigated to the vulnerable target's /index/client.php page, captured the page in its natural state, and sent the request to the Repeater tab.

Step 2: add the malicious cookie
In Repeater, the following cookie values were added to demonstrate the RCE:
Cookie: ab=ab; c=cGhwaW5mbygpOw==; d=; e=;
The value of the c cookie parameter is the string phpinfo() base64 encoded. Sending the request through demonstrates the RCE, because the phpinfo page is displayed in the background of the /index/client.php page.

That is the whole exploit: about as simple as an RCE can get.
Root cause
The underlying application logic of the EPM tool appears to have been doing an unsafe evaluation of the c cookie value. The author's reconstruction is an eval on the cookie value, with the value appended with ; first, used to validate authentication. Because the cookie is attacker-controlled and reaches eval without validation or sanitisation, arbitrary PHP code runs on the server. The code executes as the user "nobody", a low-privileged user. The exact source is not shown in the report; the snippet above is the author's guess at what the code probably looked like.
Impact
An unauthenticated attacker who can reach /index/client.php on an EPM Cloud Appliance can execute arbitrary PHP code on the server as the low-privileged user "nobody". The author demonstrated this with phpinfo(), which is enough to prove code execution. The author submitted 12 vulnerabilities over about 48 hours and netted a total of $6,500, with 3 payouts still pending all these months later.
Fix
Because the vulnerability is in a commercial product, the author simply recommended that the vulnerable organisations apply the patch provided by Ivanti. Many of the organisations that received the submission realised they no longer needed the EPM Cloud Appliance online and shut it down.
Variants to test
- Search for EPM Cloud Appliance instances by page title (for example titles containing "LANDesk(R) Cloud Services Appliance") and check whether /index/client.php is reachable.
- Replay the captured request with
c=cGhwaW5mbygpOw==in the cookie. A positive result is the phpinfo page appearing in the background of /index/client.php.
What happened, in plain words
A security researcher found that a business product called Ivanti Endpoint Manager (EPM) Cloud Appliance had a serious flaw. Anyone who could reach one particular page on the internet-facing server could make that server run code of their choosing. The researcher proved the problem on 12 targets, submitted 12 vulnerabilities, and netted a total of $6,500 with 3 payouts still pending.
A bug bounty is a scheme where companies pay independent researchers for reporting security problems in their systems, instead of the researcher selling the problem to criminals or keeping it secret. The company gets a warning and a chance to fix things; the researcher gets money and recognition.
Remote code execution (RCE) means an attacker can make a computer run commands or programs that the attacker wrote, from somewhere else on the network, without ever sitting at that machine. It is one of the most serious kinds of security bug, because once you can run code on a server you can usually do whatever the server's own programs can do: read files, talk to databases, or use the machine to attack others.
This article walks through the same story for someone who has never done security work before. Every technical term is explained the first time it appears, and every command or request is shown exactly as the researcher used it, followed by a plain-language explanation.
The product and the flaw
Ivanti Endpoint Manager (EPM) Cloud Appliance is a commercial product, meaning organisations buy it rather than build it themselves. It is a piece of software that an organisation installs on a server (the "appliance") to help manage the many computers and devices its staff use. In December 2021, Ivanti published a security advisory about it. A security advisory is an official notice from a software vendor saying "there is a problem in our product, here is what it is, and here is the fix". This one was numbered SA-2021-12-02 and described a remote code execution vulnerability.
In March 2022, members of the Synack Red Team worked together on a working exploit. Synack is a company that runs a crowd of vetted security researchers; the "Red Team" is that crowd. An exploit is the concrete technique or piece of input that actually triggers a vulnerability, as opposed to just knowing the vulnerability exists. The working exploit was later released on Twitter by @dinosyn.
The vulnerable feature is a single page on the appliance: /index/client.php. A page here means a web address the server responds to, the same way any website has pages. The researcher's analysis is that the code behind that page took a value supplied by the visitor and evaluated it as if it were program code, without checking it first. That is what allowed remote code execution.
A cookie is a small piece of text that a website asks your browser to store and send back with every request to that site. Cookies are how websites remember who you are between page loads (for example, that you are logged in). Because the browser sends them automatically, and because a visitor can edit them, cookies are a common place for attackers to put malicious input. The specific cookie involved here is named c.
The code ran as the user "nobody". On Linux and similar systems, every program runs under some user account, and each account has permissions deciding what it may read or change. "nobody" is a deliberately low-privileged account that exists on many systems precisely so that risky services do not run with full power. Running as "nobody" limits the damage, but it is still code execution on the server.
The guess at the vulnerable code
The researcher did not have the product's source code in front of them, so the snippet below is their reconstruction of what the code probably looked like. They also say they would expect some sort of validation logic to be included, meaning the real code may have had checks that this guess leaves out.
{$_COOKIE['c'] .= ';';eval($_COOKIE['c']);exit;}
Line by line, in plain words:
$_COOKIE['c']is how a PHP program refers to the value of the cookie namedcthat the visitor's browser sent. PHP is a programming language widely used to build websites..= ';'appends a semicolon character to the end of that value. In PHP, a semicolon marks the end of a statement, like a full stop in a sentence. Adding one means whatever the visitor supplied will be treated as a complete instruction.eval(...)is a PHP function that takes a piece of text and runs it as PHP code. eval is short for "evaluate". This is the dangerous part: the text being run comes from the visitor.exit;stops the program immediately afterwards.
The key idea is that eval does exactly what its name says: it evaluates a string as code. If a program passes user input into eval without validation or sanitisation (checking and cleaning it first), then the user controls what code runs. That is remote code execution.
Why speed mattered, and how the targets were found
Because the exploit was so simple, the researcher expected an extremely small window of opportunity to find bounties before other researchers found the same servers and the reports became duplicates. A duplicate is a report of a problem that has already been reported; most bounty programmes pay only the first reporter, or pay much less for repeats.
The approach was to reuse existing data rather than scan again:
- A little reconnaissance on EPM instances that were easy to find on the internet via Google showed that the majority of the pages were titled "LANDesk(R) Cloud Services Appliance". Reconnaissance (recon) means gathering information about possible targets before attacking: what software they run, what pages they expose, what they are called. The page title is the text shown in the browser tab, and search engines index it, so it is a quick way to identify a product.
- The researcher ran through all existing data on bounty programmes for page titles containing "LAN". This is where keeping historical notes pays off: the data had been collected earlier, for other purposes.
- This produced 12 targets without any additional reconnaissance.
- All 12 were still alive (reachable on the internet) and all were vulnerable.
The lesson the researcher draws is to keep historical recon data on targets for exactly this kind of occasion.
Exploitation
Step 1: capture the vulnerable page
The researcher started BurpSuite and navigated to the vulnerable target's /index/client.php page, captured the page in its natural state, and sent the request to the Repeater tab.
BurpSuite is a tool that sits between your browser and the website, like a postbox you can open and inspect. It records every request your browser sends and every response the server returns. Capturing a request means recording it so you can look at it and change it. The Repeater tab is a part of BurpSuite where you can take a captured request, edit it, send it again, and see the response, as many times as you like. This is useful because it lets you change one small thing (here, a cookie) and observe the effect, without having to click through the site again.

The screenshot shows the captured request to /index/client.php as it appears in BurpSuite, in its natural state before any modification.
Step 2: add the malicious cookie
In Repeater, the following cookie values were added to demonstrate the RCE:
Cookie: ab=ab; c=cGhwaW5mbygpOw==; d=; e=;
Line by line, in plain words:
Cookie:is the name of the HTTP header that carries cookies. A header is a labelled line of extra information sent alongside a web request or response, like the address block on an envelope. The browser adds this header automatically; here the researcher is writing it by hand.ab=abis a cookie namedabwith the valueab. It is filler, there to look like a normal cookie.c=cGhwaW5mbygpOw==is the important one. The cookie namedchas the valuecGhwaW5mbygpOw==. That value is the textphpinfo()encoded in base64. Base64 is a way of writing any bytes using only ordinary letters, digits and a couple of symbols, so that data survives being carried inside text-based formats like HTTP headers. It is not encryption: anyone can decode it. DecodingcGhwaW5mbygpOw==givesphpinfo();.d=;ande=;are two more cookies with empty values, again as filler.
phpinfo() is a standard PHP function that prints a page full of information about the PHP installation: its version, its settings, its environment. It is the classic harmless proof that code execution works, because if you can make the server run phpinfo(), you can make it run anything else too.
Sending the request through demonstrates the RCE, because the phpinfo page is displayed in the background of the /index/client.php page.

The screenshot shows the response after sending the modified request: the phpinfo output appears in the background of the /index/client.php page, which is the proof that the injected code ran on the server.
That is the whole exploit: about as simple as an RCE can get.
Root cause
The underlying application logic of the EPM tool appears to have been doing an unsafe evaluation of the c cookie value. The researcher's reconstruction is an eval on the cookie value, with the value appended with ; first, used to validate authentication. Authentication is the process of proving who you are, for example by logging in. The idea is that the page was trying to check whether the visitor was allowed in, and did so by running the cookie's contents as code.
Because the cookie is attacker-controlled and reaches eval without validation or sanitisation, arbitrary PHP code runs on the server. The code executes as the user "nobody", a low-privileged user. The exact source is not shown in the report; the snippet above is the researcher's guess at what the code probably looked like.
Impact
An unauthenticated attacker who can reach /index/client.php on an EPM Cloud Appliance can execute arbitrary PHP code on the server as the low-privileged user "nobody". Unauthenticated means no login or account is needed: anyone on the network who can reach the page can try. The researcher demonstrated this with phpinfo(), which is enough to prove code execution.
The researcher submitted 12 vulnerabilities over about 48 hours and netted a total of $6,500, with 3 payouts still pending all these months later.
Fix
Because the vulnerability is in a commercial product, the researcher simply recommended that the vulnerable organisations apply the patch provided by Ivanti. A patch is an update from the software vendor that fixes a known problem. Many of the organisations that received the submission realised they no longer needed the EPM Cloud Appliance online and shut it down, which also removes the risk.
Variants to test
- Search for EPM Cloud Appliance instances by page title (for example titles containing "LANDesk(R) Cloud Services Appliance") and check whether /index/client.php is reachable.
- Replay the captured request with
c=cGhwaW5mbygpOw==in the cookie. A positive result is the phpinfo page appearing in the background of /index/client.php. This is the actual proof of code execution.
Glossary
- Authentication: the process of proving who you are, for example by logging in with a username and password.
- Base64: a way of encoding any data using only ordinary letters, digits and a few symbols, so it can travel inside text formats such as HTTP headers.
- Bug bounty: a programme where organisations pay independent researchers for reporting security problems in their systems.
- BurpSuite: a tool that sits between a browser and a website, recording requests and responses and letting you edit and resend them.
- Capturing a request: recording a web request so you can inspect and modify it.
- Commercial product: software that organisations buy from a vendor rather than build themselves.
- Cookie: a small piece of text a website asks your browser to store and send back with every request to that site, often used to remember who you are.
- Duplicate: a report of a problem that has already been reported; most bounty programmes pay only the first reporter, or pay less for repeats.
- eval: a PHP function that takes a piece of text and runs it as PHP code.
- Exploit: the concrete technique or input that actually triggers a vulnerability.
- Header: a labelled line of extra information sent alongside a web request or response, such as the
Cookieheader. - HTTP: the protocol browsers and web servers use to exchange requests and responses.
- Low-privileged user: a user account with limited permissions, so that a compromised program cannot do everything on the system. "nobody" is a common example.
- Page title: the text shown in the browser tab for a web page, which search engines index.
- Patch: an update from a software vendor that fixes a known problem.
- PHP: a programming language widely used to build websites.
- phpinfo(): a standard PHP function that prints a page of information about the PHP installation; used as a harmless proof that code execution works.
- Reconnaissance (recon): gathering information about possible targets before attacking, such as what software they run and what pages they expose.
- Remote code execution (RCE): a vulnerability that lets an attacker make a computer run code of the attacker's choosing from elsewhere on the network.
- Repeater: the part of BurpSuite where you can edit a captured request, resend it, and see the response.
- Sanitisation: checking and cleaning user input before using it, so that it cannot be interpreted as code or commands.
- Security advisory: an official notice from a software vendor describing a problem in its product and the fix.
- Synack Red Team: the crowd of vetted security researchers run by the company Synack.
- Unauthenticated: without needing to log in or have an account.
- User account: an identity on a computer that programs run under, with permissions deciding what it may read or change.
- Validation: checking that input meets expected rules before using it.
- Vulnerability: a weakness in software that an attacker can use to make it behave in ways its maker did not intend.