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.
28137 vulnerabilities reference this CWE, most recent first.
GHSA-CGF7-VXXR-Q493
Vulnerability from github – Published: 2022-11-17 18:30 – Updated: 2022-11-21 15:30A vulnerability has been found in Hostel Searching Project and classified as critical. This vulnerability affects unknown code of the file view-property.php. The manipulation of the argument property_id leads to sql injection. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-213844.
{
"affected": [],
"aliases": [
"CVE-2022-4051"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-11-17T17:15:00Z",
"severity": "CRITICAL"
},
"details": "A vulnerability has been found in Hostel Searching Project and classified as critical. This vulnerability affects unknown code of the file view-property.php. The manipulation of the argument property_id leads to sql injection. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-213844.",
"id": "GHSA-cgf7-vxxr-q493",
"modified": "2022-11-21T15:30:22Z",
"published": "2022-11-17T18:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-4051"
},
{
"type": "WEB",
"url": "https://github.com/itzmehedi/Hostel-searching-project-using-PHP-Mysql/issues/1"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.213844"
}
],
"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-CGFM-MGJW-2F4Q
Vulnerability from github – Published: 2022-05-14 03:12 – Updated: 2022-05-14 03:12An issue was discovered in PvPGN Stats 2.4.6. SQL Injection exists in ladder/stats.php via the GET sort_direction parameter.
{
"affected": [],
"aliases": [
"CVE-2017-18290"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-06-12T18:29:00Z",
"severity": "CRITICAL"
},
"details": "An issue was discovered in PvPGN Stats 2.4.6. SQL Injection exists in ladder/stats.php via the GET sort_direction parameter.",
"id": "GHSA-cgfm-mgjw-2f4q",
"modified": "2022-05-14T03:12:14Z",
"published": "2022-05-14T03:12:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-18290"
},
{
"type": "WEB",
"url": "https://rchase.com/blog/posts/pvpgn-stats-multiple-sql-injection-vulnerabilities"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-CGFV-JRFP-2R7V
Vulnerability from github – Published: 2026-07-06 21:51 – Updated: 2026-07-06 21:51Summary
The datapoint export API builds a PostgreSQL crosstab export query by concatenating asset display names into raw SQL. An authenticated user who can create or rename an asset and then request a crosstab datapoint export can inject SQL through the asset name. The injected query output is streamed back to the caller inside the normal ZIP/CSV export response.
This creates a practical database exfiltration primitive through the application API. In a multi-tenant deployment, this can expose data outside the attacker's tenant if the application database role can read shared manager tables.
Affected Component
- Datapoint export endpoint for asset datapoints.
- Crosstab export formats, specifically CSV crosstab-style exports.
- Query builder path that constructs a
COPY (SELECT ... FROM crosstab(...)) TO STDOUTstatement.
Security Impact
Impact is high. A remote authenticated attacker with asset read/write capabilities can:
- Store SQL syntax inside an asset name.
- Trigger the crosstab export path for that asset.
- Cause the backend to execute attacker-influenced SQL through the PostgreSQL connection used by the manager service.
- Receive injected
SELECTresults in the exported CSV contained in the ZIP response.
The demonstrated impact is database data exfiltration. The proof of concept safely retrieved database execution context and an aggregate table count. A real attacker could adapt the injected SELECT to read other database tables accessible to the application database role.
This is especially sensitive in multi-tenant deployments because application tables commonly contain data for multiple realms/tenants in the same database.
Attack Preconditions
The attacker needs:
- A valid authenticated session.
- Permission to create or rename at least one asset.
- Permission to read/export datapoints for at least one attribute on that asset.
- Access to a crosstab datapoint export format.
No direct database access is required. No server filesystem access is required. No token forgery is required.
Technical Details
The export implementation derives a crosstab header from the asset name and attribute name. It then embeds that header into two SQL contexts:
- A PostgreSQL double-quoted column identifier:
"<asset name> : <attribute name>" text
- A category query passed to
crosstab(...), wrapped in a fixed dollar-quoted delimiter:
$cat$ SELECT header FROM (VALUES ('<asset name> : <attribute name>')) AS t(header) $cat$
The current escaping is incomplete:
- Single quotes are escaped in one string-literal context.
- Double quotes in asset names are not escaped before being placed inside quoted identifiers.
- The fixed dollar-quote delimiter is not protected against an asset name containing the delimiter token.
As a result, an attacker-controlled asset name can break out of the intended SQL grammar boundary and append SQL to the generated COPY ... TO STDOUT query. Because the backend streams COPY output into the export response, injected query rows are returned to the attacker as CSV.
Example Exploit Flow
- Authenticate normally.
- Create or rename an asset using a name containing SQL metacharacters that closes the crosstab column definition.
- Ensure the asset has an exportable datapoint attribute.
- Write at least one datapoint value for that attribute, if necessary.
- Request a CSV crosstab datapoint export for the crafted asset attribute.
- Inspect the returned ZIP/CSV. The CSV contains both normal datapoint rows and rows produced by the injected SQL.
A safe proof query demonstrated exfiltration of:
current_usercurrent_database()count(*)from an application table
The returned CSV contained a row equivalent to:
<timestamp>,<database_user>:<database_name>:<table_count>
Root Cause
The root cause is manual SQL string construction using user-controlled display data as SQL syntax.
The asset name is treated as presentation data in the application model, but later reused as part of executable SQL:
- As an SQL identifier in the crosstab output column list.
- As a value inside a category query string passed to PostgreSQL.
These contexts require different escaping rules. Applying partial string escaping is error-prone and currently misses exploitable grammar boundaries.
Recommended Fix
Avoid embedding user-controlled asset names directly into executable SQL.
Recommended options:
- Do not use asset names as SQL identifiers.
- Generate deterministic internal column aliases such as
c1,c2,c3. -
Keep the user-facing asset/attribute labels outside SQL and apply them only when serializing CSV headers.
-
If dynamic identifiers are unavoidable, quote them using a database-aware identifier quoting function.
- For PostgreSQL identifiers, double embedded
"characters. -
Do not perform ad hoc quoting with string concatenation.
-
Avoid fixed dollar-quote delimiters around attacker-influenced content.
- Use prepared statements or server-side functions where possible.
-
If textual SQL must be generated, choose a delimiter that cannot appear in user input or escape/validate before use.
-
Add a strict validation boundary for display names if the product can tolerate it.
- This should be defense-in-depth, not the only fix.
-
Reject control characters and SQL-significant delimiter sequences in asset names if they are not required.
-
Add regression tests for:
- Asset names containing
". - Asset names containing the fixed dollar-quote delimiter.
- Asset names containing newline/comment syntax.
- Crosstab exports with multiple assets and attributes.
- Confirmation that returned CSV never contains injected query output.
Suggested Safe Design
Build the crosstab with internal, non-user-controlled category keys and column names. For example:
- Use asset IDs and attribute names only as parameterized data for filtering.
- Generate internal column identifiers such as
col_0,col_1. - Maintain a separate mapping from
col_0to the display label. - Replace the CSV header row after query execution using application-side serialization, not SQL identifiers derived from user input.
This removes asset display names from SQL syntax entirely.
Severity
Suggested severity: High
Rationale:
- Network reachable through the authenticated API.
- Low attack complexity after authentication.
- Requires only ordinary asset read/write/export capabilities.
- Demonstrated SQL injection result exfiltration through a normal application response.
- High confidentiality impact due to possible cross-tenant database reads.
- Integrity and availability impact were not required for the demonstrated exploit and should be assessed separately based on the database role's privileges.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "io.openremote:openremote-manager"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.26.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-06T21:51:32Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nThe datapoint export API builds a PostgreSQL crosstab export query by concatenating asset display names into raw SQL. An authenticated user who can create or rename an asset and then request a crosstab datapoint export can inject SQL through the asset name. The injected query output is streamed back to the caller inside the normal ZIP/CSV export response.\n\nThis creates a practical database exfiltration primitive through the application API. In a multi-tenant deployment, this can expose data outside the attacker\u0027s tenant if the application database role can read shared manager tables.\n\n## Affected Component\n\n- Datapoint export endpoint for asset datapoints.\n- Crosstab export formats, specifically CSV crosstab-style exports.\n- Query builder path that constructs a `COPY (SELECT ... FROM crosstab(...)) TO STDOUT` statement.\n\n## Security Impact\n\nImpact is high. A remote authenticated attacker with asset read/write capabilities can:\n\n- Store SQL syntax inside an asset name.\n- Trigger the crosstab export path for that asset.\n- Cause the backend to execute attacker-influenced SQL through the PostgreSQL connection used by the manager service.\n- Receive injected `SELECT` results in the exported CSV contained in the ZIP response.\n\nThe demonstrated impact is database data exfiltration. The proof of concept safely retrieved database execution context and an aggregate table count. A real attacker could adapt the injected `SELECT` to read other database tables accessible to the application database role.\n\nThis is especially sensitive in multi-tenant deployments because application tables commonly contain data for multiple realms/tenants in the same database.\n\n## Attack Preconditions\n\nThe attacker needs:\n\n- A valid authenticated session.\n- Permission to create or rename at least one asset.\n- Permission to read/export datapoints for at least one attribute on that asset.\n- Access to a crosstab datapoint export format.\n\nNo direct database access is required. No server filesystem access is required. No token forgery is required.\n\n## Technical Details\n\nThe export implementation derives a crosstab header from the asset name and attribute name. It then embeds that header into two SQL contexts:\n\n1. A PostgreSQL double-quoted column identifier:\n\n```sql\n\"\u003casset name\u003e : \u003cattribute name\u003e\" text\n```\n\n2. A category query passed to `crosstab(...)`, wrapped in a fixed dollar-quoted delimiter:\n\n```sql\n$cat$ SELECT header FROM (VALUES (\u0027\u003casset name\u003e : \u003cattribute name\u003e\u0027)) AS t(header) $cat$\n```\n\nThe current escaping is incomplete:\n\n- Single quotes are escaped in one string-literal context.\n- Double quotes in asset names are not escaped before being placed inside quoted identifiers.\n- The fixed dollar-quote delimiter is not protected against an asset name containing the delimiter token.\n\nAs a result, an attacker-controlled asset name can break out of the intended SQL grammar boundary and append SQL to the generated `COPY ... TO STDOUT` query. Because the backend streams `COPY` output into the export response, injected query rows are returned to the attacker as CSV.\n\n## Example Exploit Flow\n\n1. Authenticate normally.\n2. Create or rename an asset using a name containing SQL metacharacters that closes the crosstab column definition.\n3. Ensure the asset has an exportable datapoint attribute.\n4. Write at least one datapoint value for that attribute, if necessary.\n5. Request a CSV crosstab datapoint export for the crafted asset attribute.\n6. Inspect the returned ZIP/CSV. The CSV contains both normal datapoint rows and rows produced by the injected SQL.\n\nA safe proof query demonstrated exfiltration of:\n\n- `current_user`\n- `current_database()`\n- `count(*)` from an application table\n\nThe returned CSV contained a row equivalent to:\n\n```text\n\u003ctimestamp\u003e,\u003cdatabase_user\u003e:\u003cdatabase_name\u003e:\u003ctable_count\u003e\n```\n\n## Root Cause\n\nThe root cause is manual SQL string construction using user-controlled display data as SQL syntax.\n\nThe asset name is treated as presentation data in the application model, but later reused as part of executable SQL:\n\n- As an SQL identifier in the crosstab output column list.\n- As a value inside a category query string passed to PostgreSQL.\n\nThese contexts require different escaping rules. Applying partial string escaping is error-prone and currently misses exploitable grammar boundaries.\n\n## Recommended Fix\n\nAvoid embedding user-controlled asset names directly into executable SQL.\n\nRecommended options:\n\n1. Do not use asset names as SQL identifiers.\n - Generate deterministic internal column aliases such as `c1`, `c2`, `c3`.\n - Keep the user-facing asset/attribute labels outside SQL and apply them only when serializing CSV headers.\n\n2. If dynamic identifiers are unavoidable, quote them using a database-aware identifier quoting function.\n - For PostgreSQL identifiers, double embedded `\"` characters.\n - Do not perform ad hoc quoting with string concatenation.\n\n3. Avoid fixed dollar-quote delimiters around attacker-influenced content.\n - Use prepared statements or server-side functions where possible.\n - If textual SQL must be generated, choose a delimiter that cannot appear in user input or escape/validate before use.\n\n4. Add a strict validation boundary for display names if the product can tolerate it.\n - This should be defense-in-depth, not the only fix.\n - Reject control characters and SQL-significant delimiter sequences in asset names if they are not required.\n\n5. Add regression tests for:\n - Asset names containing `\"`.\n - Asset names containing the fixed dollar-quote delimiter.\n - Asset names containing newline/comment syntax.\n - Crosstab exports with multiple assets and attributes.\n - Confirmation that returned CSV never contains injected query output.\n\n## Suggested Safe Design\n\nBuild the crosstab with internal, non-user-controlled category keys and column names. For example:\n\n- Use asset IDs and attribute names only as parameterized data for filtering.\n- Generate internal column identifiers such as `col_0`, `col_1`.\n- Maintain a separate mapping from `col_0` to the display label.\n- Replace the CSV header row after query execution using application-side serialization, not SQL identifiers derived from user input.\n\nThis removes asset display names from SQL syntax entirely.\n\n## Severity\n\nSuggested severity: High\n\nRationale:\n\n- Network reachable through the authenticated API.\n- Low attack complexity after authentication.\n- Requires only ordinary asset read/write/export capabilities.\n- Demonstrated SQL injection result exfiltration through a normal application response.\n- High confidentiality impact due to possible cross-tenant database reads.\n- Integrity and availability impact were not required for the demonstrated exploit and should be assessed separately based on the database role\u0027s privileges.",
"id": "GHSA-cgfv-jrfp-2r7v",
"modified": "2026-07-06T21:51:32Z",
"published": "2026-07-06T21:51:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openremote/openremote/security/advisories/GHSA-cgfv-jrfp-2r7v"
},
{
"type": "WEB",
"url": "https://github.com/openremote/openremote/commit/02ac83074b81617add814b2a72d459abdf374147"
},
{
"type": "PACKAGE",
"url": "https://github.com/openremote/openremote"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "OpenRemote has Authenticated SQL Injection via Datapoint Crosstab Export"
}
GHSA-CGFW-66J9-Q2XP
Vulnerability from github – Published: 2026-02-07 00:30 – Updated: 2026-02-07 00:30eLection 2.0 contains an authenticated SQL injection vulnerability in the candidate management endpoint that allows attackers to manipulate database queries through the 'id' parameter. Attackers can leverage SQLMap to exploit the vulnerability, potentially gaining remote code execution by uploading backdoor files to the web application directory.
{
"affected": [],
"aliases": [
"CVE-2020-37154"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-02-07T00:15:55Z",
"severity": "HIGH"
},
"details": "eLection 2.0 contains an authenticated SQL injection vulnerability in the candidate management endpoint that allows attackers to manipulate database queries through the \u0027id\u0027 parameter. Attackers can leverage SQLMap to exploit the vulnerability, potentially gaining remote code execution by uploading backdoor files to the web application directory.",
"id": "GHSA-cgfw-66j9-q2xp",
"modified": "2026-02-07T00:30:28Z",
"published": "2026-02-07T00:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-37154"
},
{
"type": "WEB",
"url": "https://github.com/J3rryBl4nks/eLection-TriPath-/blob/master/SQLiIntoRCE.md"
},
{
"type": "WEB",
"url": "https://sourceforge.net/projects/election-by-tripath"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/48122"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/election-id-sql-injection"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/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-CGG9-XRP8-443H
Vulnerability from github – Published: 2022-05-02 06:18 – Updated: 2022-05-02 06:18SQL injection vulnerability in vedi_faq.php in PHP Trouble Ticket 2.2 allows remote attackers to execute arbitrary SQL commands via the id parameter.
{
"affected": [],
"aliases": [
"CVE-2010-1089"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-03-24T22:44:00Z",
"severity": "HIGH"
},
"details": "SQL injection vulnerability in vedi_faq.php in PHP Trouble Ticket 2.2 allows remote attackers to execute arbitrary SQL commands via the id parameter.",
"id": "GHSA-cgg9-xrp8-443h",
"modified": "2022-05-02T06:18:55Z",
"published": "2022-05-02T06:18:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-1089"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.org/1003-exploits/phptroubleticket-sql.txt"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/38763"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-CGGP-723H-VG48
Vulnerability from github – Published: 2022-05-24 17:12 – Updated: 2025-10-22 00:31The HTTP interface of the Grandstream UCM6200 series is vulnerable to an unauthenticated remote SQL injection via crafted HTTP request. An attacker can use this vulnerability to execute shell commands as root on versions before 1.0.19.20 or inject HTML in password recovery emails in versions before 1.0.20.17.
{
"affected": [],
"aliases": [
"CVE-2020-5722"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-03-23T20:15:00Z",
"severity": "HIGH"
},
"details": "The HTTP interface of the Grandstream UCM6200 series is vulnerable to an unauthenticated remote SQL injection via crafted HTTP request. An attacker can use this vulnerability to execute shell commands as root on versions before 1.0.19.20 or inject HTML in password recovery emails in versions before 1.0.20.17.",
"id": "GHSA-cggp-723h-vg48",
"modified": "2025-10-22T00:31:51Z",
"published": "2022-05-24T17:12:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-5722"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-5722"
},
{
"type": "WEB",
"url": "https://www.tenable.com/security/research/tra-2020-15"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/156876/UCM6202-1.0.18.13-Remote-Command-Injection.html"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/165708/Grandstream-UCM62xx-IP-PBX-sendPasswordEmail-Remote-Code-Execution.html"
}
],
"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-CGH5-WWXM-VX88
Vulnerability from github – Published: 2022-05-17 00:22 – Updated: 2025-04-20 03:47Nice PHP FAQ Script allows SQL Injection via the index.php nice_theme parameter, a different vulnerability than CVE-2008-6525.
{
"affected": [],
"aliases": [
"CVE-2017-15988"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-10-31T07:29:00Z",
"severity": "CRITICAL"
},
"details": "Nice PHP FAQ Script allows SQL Injection via the index.php nice_theme parameter, a different vulnerability than CVE-2008-6525.",
"id": "GHSA-cgh5-wwxm-vx88",
"modified": "2025-04-20T03:47:56Z",
"published": "2022-05-17T00:22:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-15988"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/43071"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-CGH7-7JVJ-846C
Vulnerability from github – Published: 2026-03-13 21:31 – Updated: 2026-03-13 21:31Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') vulnerability in codepeople CP Contact Form with Paypal cp-contact-form-with-paypal allows Blind SQL Injection.This issue affects CP Contact Form with Paypal: from n/a through <= 1.3.61.
{
"affected": [],
"aliases": [
"CVE-2026-32433"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-13T19:55:02Z",
"severity": "HIGH"
},
"details": "Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027) vulnerability in codepeople CP Contact Form with Paypal cp-contact-form-with-paypal allows Blind SQL Injection.This issue affects CP Contact Form with Paypal: from n/a through \u003c= 1.3.61.",
"id": "GHSA-cgh7-7jvj-846c",
"modified": "2026-03-13T21:31:50Z",
"published": "2026-03-13T21:31:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32433"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/cp-contact-form-with-paypal/vulnerability/wordpress-cp-contact-form-with-paypal-plugin-1-3-61-sql-injection-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-CGHV-7F9H-5RHG
Vulnerability from github – Published: 2022-05-17 00:22 – Updated: 2022-05-17 00:22An SQL Injection vulnerability in HP ArcSight ESM and HP ArcSight ESM Express, in any 6.x version prior to 6.9.1c Patch 4 or 6.11.0 Patch 1. This vulnerability could be exploited remotely to allow SQL injection.
{
"affected": [],
"aliases": [
"CVE-2017-14356"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-10-31T15:29:00Z",
"severity": "CRITICAL"
},
"details": "An SQL Injection vulnerability in HP ArcSight ESM and HP ArcSight ESM Express, in any 6.x version prior to 6.9.1c Patch 4 or 6.11.0 Patch 1. This vulnerability could be exploited remotely to allow SQL injection.",
"id": "GHSA-cghv-7f9h-5rhg",
"modified": "2022-05-17T00:22:54Z",
"published": "2022-05-17T00:22:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-14356"
},
{
"type": "WEB",
"url": "https://softwaresupport.hpe.com/km/KM02996760"
},
{
"type": "WEB",
"url": "https://www.auscert.org.au/bulletins/54166"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/101627"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-CGJ9-7XQ3-FG5G
Vulnerability from github – Published: 2022-05-17 05:01 – Updated: 2022-05-17 05:01SQL injection vulnerability in mod_accounting.c in the mod_accounting module 0.5 and earlier for Apache allows remote attackers to execute arbitrary SQL commands via a Host header.
{
"affected": [],
"aliases": [
"CVE-2013-5697"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-09-30T21:55:00Z",
"severity": "HIGH"
},
"details": "SQL injection vulnerability in mod_accounting.c in the mod_accounting module 0.5 and earlier for Apache allows remote attackers to execute arbitrary SQL commands via a Host header.",
"id": "GHSA-cgj9-7xq3-fg5g",
"modified": "2022-05-17T05:01:01Z",
"published": "2022-05-17T05:01:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-5697"
},
{
"type": "WEB",
"url": "http://osvdb.org/97588"
},
{
"type": "WEB",
"url": "http://www.baesystemsdetica.com.au/Research/Advisories/mod_accounting-Blind-SQL-Injection-%28DS-2013-006%29"
}
],
"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.