CVE-2022-40300: SQL Injection In Manageengine Privileged Access Management
A SQL injection vulnerability exists in ManageEngine Password Manager Pro, PAM360, and Access Manager Plus due to improper validation of resource type names in the AutoLogonHelperUtil class. An authenticated attacker could add a resource type with a malicious name and then trigger its use in a SQL query, potentially executing arbitrary SQL commands with SYSTEM privileges.
Published on zerodayinitiative.com
ManageEngine recently patched a SQL injection vulnerability bug in their Password Manager Pro, PAM360, and Access Manager Plus products. The vulnerability is due to improper validation of resource types in the AutoLogonHelperUtil class.
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
The getOSTypeCriteria() method in AutoLogonHelperUtil does not sanitize resource type names before using them to build a partial SQL statement.
Impact
Successful exploitation could lead to arbitrary SQL code execution in the security context of the database service, which runs with SYSTEM privileges.
What the attacker needed
Admin privileges on the target product
How it was found
- Log in as an admin and add or edit a resource type with a name containing SQL injection characters.
- Click a menu such as 'Connections' to trigger a request that uses the malicious resource type name in a SQL query.
- The injected SQL command is executed by the database.
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.
This is a SQL injection bug. The application takes a name you give to a resource type and puts it directly into a database query without cleaning it. An attacker with an admin account can create a resource type with a special name that tricks the database into running extra commands, which could let them read or change data or even run system commands.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.