OpenSTAManager Article Pricing Time-Based Blind SQL Injection — CVE-2026-24416
by Łukasz Rybak (lukasz-rybak) · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-24416
- Category
- web
- Affected product
- OpenSTAManager (devcode-it/openstamanager)
- Affected versions
- <= 2.9.8
- Disclosed
- 2026-07-05
- Patch status
- patched
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-04 |
| Author / Researcher | Łukasz Rybak (lukasz-rybak) |
| CVE / Advisory | CVE-2026-24416 |
| Category | web |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | sql-injection, time-based-blind, openstamanager, php, ajax, credential-theft, authenticated |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | OpenSTAManager (devcode-it/openstamanager) |
| Versions Affected | <= 2.9.8 |
| Language / Platform | PHP web application; PoC written in Bash (curl) and Python (requests) |
| Authentication Required | Yes (any valid authenticated user) |
| Network Access Required | Yes |
Summary
OpenSTAManager’s article pricing AJAX handler (/ajax_complete.php?op=getprezzi) builds a UNION SQL query to pull pricing history from invoices and delivery notes. The developer correctly wrapped the idarticolo parameter in the framework’s prepare() sanitizer for the first SELECT of the UNION, but forgot to do so for the second SELECT, leaving that branch open to direct string concatenation into the query. An authenticated attacker can append boolean/time-based SQL conditions (e.g. SUBSTRING(DATABASE(),1,1)='o' AND SLEEP(2)) to the idarticolo value and infer arbitrary data — including the zz_users table’s usernames and bcrypt password hashes — one character at a time based on response timing. The included Python script automates this character-by-character extraction against a live target.
Vulnerability Details
Root Cause
Inconsistent use of the prepare() parameterization helper: /modules/articoli/ajax/complete.php sanitizes idarticolo in the first SELECT of a UNION query but concatenates it unsanitized in the second SELECT (around line 70), permitting SQL injection.
Attack Vector
- Authenticate to the OpenSTAManager instance with any valid account.
- Send a GET request to
/ajax_complete.php?op=getprezziwith a craftedidarticoloparameter containing a boolean/time-based SQL payload (e.g.1 AND (SELECT 1 FROM (SELECT(SLEEP(N)))a)). - Measure response latency to confirm whether the injected boolean condition evaluated true.
- Iterate the technique with
SUBSTRING()/ORD()comparisons to blind-extract the database name, then usernames and password hashes fromzz_users.
Impact
Full database exfiltration (customer data, financial records, and admin credential hashes) by any authenticated user, with no privileged role required.
Environment / Lab Setup
Target: OpenSTAManager <= 2.9.8 (PHP/MySQL), e.g. http://localhost:8081
Attacker: curl, Python 3 with `requests` library
Proof of Concept
PoC Script
See
poc_extract_article_pricing.pyin this folder.
| |
The script logs in with configured credentials, then repeatedly issues timing-based injected requests to /ajax_complete.php to blind-extract the database name, the admin username, and the admin password hash character by character, printing a final report.
Detection & Indicators of Compromise
GET /ajax_complete.php?op=getprezzi&idarticolo=1%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP(...)))a) ... response time >> baseline
Signs of compromise:
- Bursts of
ajax_complete.phprequests with abnormally long response times from a single authenticated session. - SQL keywords (
SLEEP,SUBSTRING,ORD,zz_users) present in URL-decoded request parameters in web server logs. - Unusual sequential single-character probing pattern across many requests from the same session/IP.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Apply prepare() to the idarticolo parameter in the second SELECT of the UNION query in /modules/articoli/ajax/complete.php (upgrade to a patched OpenSTAManager release once available). |
| Interim mitigation | Deploy a WAF rule blocking SQL meta-characters/functions (SLEEP(, SUBSTRING(, UNION) in the idarticolo parameter; restrict access to the pricing module to trusted roles. |
References
Notes
Mirrored from https://github.com/lukasz-rybak/CVE-2026-24416 on 2026-07-05.
| |