Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2021-40539: Authentication Bypass and Remote Code Execution in Zoho ManageEngine ADSelfService Plus

Published Sep 7, 2021 · Updated 13 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.8Critical · v3.1
EPSS99.0%100th percentile
CISA KEVYesAdded Nov 3, 2021
In the wildActivePer CISA KEV
Vendor
Zoho Corporation
IdentifiersCVE-2021-40539CWE-288

CVE-2021-40539 is a critical authentication bypass vulnerability affecting Zoho ManageEngine ADSelfService Plus builds 6113 and earlier. Incorrect URL normalization before validation allows specially crafted requests to bypass the security filter protecting REST API endpoints. Unauthenticated attackers can access protected functionality and chain API operations to upload a JavaServer Pages webshell and execute arbitrary code remotely. The vulnerability has been actively exploited for initial access in espionage and ransomware campaigns.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can compromise the ADSelfService Plus host, allowing arbitrary command execution, malware installation, persistent webshell access, and theft of application data and credentials. Observed follow-on activity includes administrator credential compromise, lateral movement, theft of Active Directory databases and registry hives, data exfiltration, and ransomware preparation. Domain-wide compromise is possible when attackers subsequently obtain domain administrator credentials or domain controller credential material; these outcomes depend on the surrounding environment and further attacker actions.

Mitigation

If you can’t patch tonight, do this now.

Remove direct internet access to ADSelfService Plus and restrict network access to trusted systems. Monitor application access logs, Java exceptions associated with certificate configuration, unexpected web application artifacts, suspicious child processes, unauthorized accounts, credential dumping, and lateral movement. Hunt for persistent webshells and campaign tools as well as evidence of the initial exploit, because attackers may remove exploitation traces.

Remediation

Patch, then assume compromise.

Upgrade ADSelfService Plus to build 6114, which fixes the vulnerability, or a later supported release. Investigate potentially exposed installations using the vendor's updated exploit detection tool, application logs, and webshell detection guidance. If compromise is identified, isolate the host, preserve evidence and necessary application data, rebuild the compromised system, reinstall a patched version, and restore validated backups. Investigate compromised Active Directory accounts and lateral movement. If Active Directory database compromise is indicated, perform domain-wide password resets and reset the Kerberos ticket-granting account password twice. Patching alone does not remove existing attacker access.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.

View more in app →
manageengine_adselfservice_plus_cve_2021_40539.rbThis repository contains a single Metasploit module that exploits CVE-2021-40539, an authentication bypass vulnerability in the REST API of ManageEngine ADSelfService Plus. The exploit works by bypassing authentication, uploading a malicious Java JAR file to the server, and then executing it via a crafted API call. The module leverages Metasploit's payload generation capabilities, allowing the attacker to execute arbitrary code as the user running the ADSelfService Plus service (often SYSTEM on Windows). The main endpoints targeted are '/RestAPI/LogonCustomization' for both the authentication bypass and payload upload, and '/RestAPI/Connection' for payload execution. The exploit is weaponized, highly reliable, and leaves artifacts on disk and in logs. The repository is structured as a single Ruby file compatible with the Metasploit framework, and is intended for use by penetration testers and security researchers.Disclosed Sep 7, 2021 · Framework: metasploit · ruby · networkWeaponizedCVE-2021-40539This repository contains a Python exploit script (exploit.py) targeting CVE-2021-40539, a critical authentication bypass and RCE vulnerability in ManageEngine ADSelfService Plus. The exploit works by uploading a JSP webshell and/or a malicious Java class to the vulnerable server via the '/./RestAPI/LogonCustomization' endpoint, then triggering remote code execution through the '/./RestAPI/Connection' endpoint. The script can optionally verify if the target is vulnerable before exploitation. If successful, the attacker gains a webshell at '/help/admin-guide/test.jsp', allowing arbitrary command execution. The repository is structured with a single exploit script and a README referencing external exploitation details. The exploit is operational, providing a working payload and automated exploitation steps.synacktiv · Disclosed Nov 3, 2021 · python · networkOperationalCVE-2021-40539This repository contains a Python exploit script (CVE-2021-40539.py) targeting Zoho ManageEngine ADSelfService Plus (version 6113 and earlier) for CVE-2021-40539, a critical authentication bypass and remote code execution vulnerability. The script allows both single-target and batch exploitation. It first checks if the target is vulnerable by sending a crafted POST request to the '/./RestAPI/LogonCustomization' endpoint. If vulnerable, it uploads a JSP webshell and a Java class file (either user-supplied or a default payload) to the same endpoint. The exploit then triggers RCE by sending a POST request to '/./RestAPI/Connection', leveraging the uploaded Java class. Finally, it verifies the webshell at '/help/admin-guide/test.jsp', which can be used to execute arbitrary commands on the target system. The repository also includes a README.md with usage instructions and background on the vulnerability. The exploit is operational, providing a working RCE chain with persistent access via the webshell.lpyydxs · Disclosed Oct 12, 2024 · python · networkOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Zoho CorporationManageengine Adselfservice Plusapplication
FAQ

Frequently asked questions

Is CVE-2021-40539 exploited in the wild?
Yes. As of Nov 4, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
Is there a public exploit for CVE-2021-40539?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2021-40539, the earliest disclosed Sep 7, 2021.
Is there a patch for CVE-2021-40539?
Upgrade ADSelfService Plus to build 6114, which fixes the vulnerability, or a later supported release. Investigate potentially exposed installations using the vendor's updated exploit detection tool, application logs, and webshell detection guidance.
What products are affected by CVE-2021-40539?
Zoho Corporation Manageengine Adselfservice Plus.
How severe is CVE-2021-40539?
CVE-2021-40539 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 99.0% (100th percentile) as of Nov 4, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence15Every report linking this CVE to a named adversary.
Associated malware27Malware families linked to this CVE, with evidence and IOCs.
Detection signatures6YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity6Community discussion across Reddit, Mastodon, and other social sources.