Lucene search

K
huntr0xb4cEDEED309-BE07-4373-B15E-2D1EB415EB89
HistoryAug 16, 2022 - 9:36 a.m.

Stored XSS in 'Table name' field via Database information function

2022-08-1609:36:44
0xb4c
www.huntr.dev
9

0.001 Low

EPSS

Percentile

21.6%

Description

When the administrator uses the Database information function, malicious code will be accidentally called and executed through two cases:

  1. (1) An internal attacker (local) with access right to the database could insert malicious content into the table name field by creating a table in the database.
  2. (2) The second possible case is when the system administrator performs a malicious import of the database from an unknown source with the table name field injected by malicious content.

Proof of Concept

Payload

CREATE TABLE `yetiforce`.`<script>alert('stored_xss')</script>` ( `id` INT NOT NULL ) ENGINE = InnoDB CHARSET=armscii8 COLLATE armscii8_general_nopad_ci;

Reprodution steps

  • Step 1: The internal attacker create a new table with the payload above.

PoC - Step 1

  • Step 2: Access Database information function in Admin Dashboard > Logs > Server configuration

PoC - Step 2

  • Step 3: The XSS should fire immediately when detailed information about the database is loaded.

PoC - Step 3.1

PoC - Step 3.2

0.001 Low

EPSS

Percentile

21.6%

Related for EDEED309-BE07-4373-B15E-2D1EB415EB89