CVE-2024-5546 - Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Severity

88%

Complexity

27%

Confidentiality

98%

Zohocorp ManageEngine Password Manager Pro versions before 12431 and ManageEngine PAM360 versions before 7001 are affected by authenticated SQL Injection vulnerability via a global search option.

CVSS 3.1 Base Score 8.8. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Demo Examples

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

CWE-89

In 2008, a large number of web servers were compromised using the same SQL injection attack string. This single string worked against many different programs. The SQL injection was then used to modify the web sites to serve malicious code.

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

CWE-89

The following code dynamically constructs and executes a SQL query that searches for items matching a specified name. The query restricts the items displayed to those where owner matches the user name of the currently-authenticated user.


               
...

The query that this code intends to execute follows:


               
SELECT * FROM items WHERE owner = <userName> AND itemname = <itemName>;

However, because the query is constructed dynamically by concatenating a constant base query string and a user input string, the query only behaves correctly if itemName does not contain a single-quote character. If an attacker with the user name wiley enters the string:


               
name' OR 'a'='a

for itemName, then the query becomes the following:


               
SELECT * FROM items WHERE owner = 'wiley' AND itemname = 'name' OR 'a'='a';

The addition of the:


               
OR 'a'='a

condition causes the WHERE clause to always evaluate to true, so the query becomes logically equivalent to the much simpler query:


               
SELECT * FROM items;

This simplification of the query allows the attacker to bypass the requirement that the query only return items owned by the authenticated user; the query now returns all entries stored in the items table, regardless of their specified owner.

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

CWE-89

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

CWE-89

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

CWE-89

This code intends to print a message summary given the message ID.


               
mysql_query("SELECT MessageID, Subject FROM messages WHERE MessageID = '$id'");

The programmer may have skipped any input validation on $id under the assumption that attackers cannot modify the cookie. However, this is easy to do with custom client code or even in the web browser.

While $id is wrapped in single quotes in the call to mysql_query(), an attacker could simply change the incoming mid cookie to:


               
1432' or '1' = '1

This would produce the resulting query:


               
SELECT MessageID, Subject FROM messages WHERE MessageID = '1432' or '1' = '1'

Not only will this retrieve message number 1432, it will retrieve all other messages.

In this case, the programmer could apply a simple modification to the code to eliminate the SQL injection:


               
mysql_query("SELECT MessageID, Subject FROM messages WHERE MessageID = '$id'");

However, if this code is intended to support multiple users with different message boxes, the code might also need an access control check (CWE-285) to ensure that the application user has the permission to see that message.

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

CWE-89

This example attempts to take a last name provided by a user and enter it into a database.


               
$query = "INSERT INTO last_names VALUES('$userKey', '$name')";# ensure only letters, hyphens and apostrophe are allowed

While the programmer applies a whitelist to the user input, it has shortcomings. First of all, the user is still allowed to provide hyphens which are used as comment structures in SQL. If a user specifies -- then the remainder of the statement will be treated as a comment, which may bypass security logic. Furthermore, the whitelist permits the apostrophe which is also a data / command separator in SQL. If a user supplies a name with an apostrophe, they may be able to alter the structure of the whole statement and even change control flow of the program, possibly accessing or modifying confidential information. In this situation, both the hyphen and apostrophe are legitimate characters for a last name and permitting them is required. Instead, a programmer may want to use a prepared statement or apply an encoding routine to the input to prevent any data / directive misinterpretations.

Overview

Type

ZohoCorp ManageEngine Password Manager Pro

First reported 5 months ago

2024-08-28 09:15:00

Last updated 5 months ago

2024-09-19 14:39:00

Affected Software

ZohoCorp ManageEngine Password Manager Pro 6.0 Build 6002

6.0

ZohoCorp ManageEngine Password Manager Pro 6.1 Build 6104

6.1

ZohoCorp ManageEngine Password Manager Pro 6.2 Build 6201

6.2

ZohoCorp ManageEngine Password Manager Pro 6.4 Build 6401

6.4

ZohoCorp ManageEngine Password Manager Pro 6.4 Build 6402

6.4

ZohoCorp ManageEngine Password Manager Pro 6.4 Build 6403

6.4

ZohoCorp ManageEngine Password Manager Pro 6.4 Build 6404

6.4

ZohoCorp ManageEngine Password Manager Pro 6.5 Build 6503

6.5

ZohoCorp ManageEngine Password Manager Pro 6.5 Build 6504

6.5

ZohoCorp ManageEngine Password Manager Pro 6.5 Build 6505

6.5

ZohoCorp ManageEngine Password Manager Pro 6.6 Build 6600

6.6

ZohoCorp ManageEngine Password Manager Pro 6.7 Build 6700

6.7

ZohoCorp ManageEngine Password Manager Pro 6.7 Build 6701

6.7

ZohoCorp ManageEngine Password Manager Pro 6.8 Build 6800

6.8

ZohoCorp ManageEngine Password Manager Pro 6.8 Build 6801

6.8

ZohoCorp ManageEngine Password Manager Pro 6.8 Build 6802

6.8

ZohoCorp ManageEngine Password Manager Pro 6.8 Build 6803

6.8

ZohoCorp ManageEngine Password Manager Pro 6.9 Build 6900

6.9

ZohoCorp ManageEngine Password Manager Pro 6.9 Build 6901

6.9

ZohoCorp ManageEngine Password Manager Pro 6.9 Build 6902

6.9

ZohoCorp ManageEngine Password Manager Pro 6.9 Build 6903

6.9

ZohoCorp ManageEngine Password Manager Pro 6.9 Build 6904

6.9

ZohoCorp ManageEngine Password Manager Pro 7.0 Build 7000

7.0

ZohoCorp ManageEngine Password Manager Pro 7.0 Build 7001

7.0

ZohoCorp ManageEngine Password Manager Pro 7.0 Build 7002

7.0

ZohoCorp ManageEngine Password Manager Pro 7.0 Build 7003

7.0

ZohoCorp ManageEngine Password Manager Pro 7.1 Build 7100

7.1

ZohoCorp ManageEngine Password Manager Pro 7.1 Build 7101

7.1

ZohoCorp ManageEngine Password Manager Pro 7.1 Build 7102

7.1

ZohoCorp ManageEngine Password Manager Pro 7.1 Build 7103

7.1

ZohoCorp ManageEngine Password Manager Pro 7.1 Build 7104

7.1

ZohoCorp ManageEngine Password Manager Pro 7.1 Build 7105

7.1

ZohoCorp ManageEngine Password Manager Pro 7.5 Build 7500

7.5

ZohoCorp ManageEngine Password Manager Pro 7.5 Build 7501

7.5

ZohoCorp ManageEngine Password Manager Pro 7.6 Build 7600

7.6

ZohoCorp ManageEngine Password Manager Pro 8.0 Build 8000

8.0

ZohoCorp ManageEngine Password Manager Pro 8.0 Build 8001

8.0

ZohoCorp ManageEngine Password Manager Pro 8.1 Build 8100

8.1

ZohoCorp ManageEngine Password Manager Pro 8.1 Build 8101

8.1

ZohoCorp ManageEngine Password Manager Pro 8.1 Build 8102

8.1

ZohoCorp ManageEngine Password Manager Pro 8.2 Build 8200

8.2

ZohoCorp ManageEngine Password Manager Pro 8.3 Build 8300

8.3

ZohoCorp ManageEngine Password Manager Pro 8.3 Build 8301

8.3

ZohoCorp ManageEngine Password Manager Pro 8.3 Build 8302

8.3

ZohoCorp ManageEngine Password Manager Pro 8.3 Build 8303

8.3

ZohoCorp ManageEngine Password Manager Pro 8.4 Build 8041

8.4

ZohoCorp ManageEngine Password Manager Pro 8.4 Build 8400

8.4

ZohoCorp ManageEngine Password Manager Pro 8.4 Build 8402

8.4

ZohoCorp ManageEngine Password Manager Pro 8.4 Build 8403

8.4

ZohoCorp ManageEngine Password Manager Pro 8.4 Build 8404

8.4

ZohoCorp ManageEngine Password Manager Pro 8.5 Build 8500

8.5

ZohoCorp ManageEngine Password Manager Pro 8.5 Build 8501

8.5

ZohoCorp ManageEngine Password Manager Pro 8.5 Build 8502

8.5

ZohoCorp ManageEngine Password Manager Pro 8.5 Build 8503

8.5

ZohoCorp ManageEngine Password Manager Pro 8.5 Build 8504

8.5

ZohoCorp ManageEngine Password Manager Pro 8.5 Build 8505

8.5

ZohoCorp ManageEngine Password Manager Pro 8.6 Build 8600

8.6

ZohoCorp ManageEngine Password Manager Pro 8.6 Build 8601

8.6

ZohoCorp ManageEngine Password Manager Pro 8.6 Build 8602

8.6

ZohoCorp ManageEngine Password Manager Pro 8.6 Build 8603

8.6

ZohoCorp ManageEngine Password Manager Pro 8.6 Build 8604

8.6

ZohoCorp ManageEngine Password Manager Pro 8.7 Build 8700

8.7

ZohoCorp ManageEngine Password Manager Pro 8.7 Build 8701

8.7

ZohoCorp ManageEngine Password Manager Pro 8.7 Build 8702

8.7

ZohoCorp ManageEngine Password Manager Pro 8.7 Build 8703

8.7

ZohoCorp ManageEngine Password Manager Pro 8.7 Build 8704

8.7

ZohoCorp ManageEngine Password Manager Pro 9.0 Build 9000

9.0

ZohoCorp ManageEngine Password Manager Pro 9.0 Build 9001

9.0

ZohoCorp ManageEngine Password Manager Pro 9.0 Build 9002

9.0

ZohoCorp ManageEngine Password Manager Pro 9.0 Build 9003

9.0

ZohoCorp ManageEngine Password Manager Pro 9.1 Build 9100

9.1

ZohoCorp ManageEngine Password Manager Pro 9.1 Build 9101

9.1

ZohoCorp ManageEngine Password Manager Pro 9.2 Build 9200

9.2

ZohoCorp ManageEngine Password Manager Pro 9.3 Build 9300

9.3

ZohoCorp ManageEngine Password Manager Pro 9.4 Build 9400

9.4

ZohoCorp ManageEngine Password Manager Pro 9.4 Build 9401

9.4

ZohoCorp ManageEngine Password Manager Pro 9.4 Build 9402

9.4

ZohoCorp ManageEngine Password Manager Pro 9.5 Build 9500

9.5

ZohoCorp ManageEngine Password Manager Pro 9.5 Build 9501

9.5

ZohoCorp ManageEngine Password Manager Pro 9.5 Build 9502

9.5

ZohoCorp ManageEngine Password Manager Pro 9.6 Build 9600

9.6

ZohoCorp ManageEngine Password Manager Pro 9.6 Build 9601

9.6

ZohoCorp ManageEngine Password Manager Pro 9.7 Build 9700

9.7

ZohoCorp ManageEngine Password Manager Pro 9.7 Build 9701

9.7

ZohoCorp ManageEngine Password Manager Pro 9.7 Build 9702

9.7

ZohoCorp ManageEngine Password Manager Pro 9.8 Build 9800

9.8

ZohoCorp ManageEngine Password Manager Pro 9.8 Build 9801

9.8

ZohoCorp ManageEngine Password Manager Pro 9.8 Build 9802

9.8

ZohoCorp ManageEngine Password Manager Pro 9.8 Build 9803

9.8

ZohoCorp ManageEngine Password Manager Pro 9.9 Build 9900

9.9

ZohoCorp ManageEngine Password Manager Pro 9.9 Build 9901

9.9

ZohoCorp ManageEngine Password Manager Pro 10.0 Build 10000

10.0

ZohoCorp ManageEngine Password Manager Pro 10.0 Build 10001

10.0

ZohoCorp ManageEngine Password Manager Pro 10.1 Build 10100

10.1

ZohoCorp ManageEngine Password Manager Pro 10.1 Build 10101

10.1

ZohoCorp ManageEngine Password Manager Pro 10.1 Build 10102

10.1

ZohoCorp ManageEngine Password Manager Pro 10.1 Build 10103

10.1

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.