-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Bug Report
| Q | A |
|---|---|
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | needs verification |
| Licence | Apache-2.0 |
Critical Issues
SQL Injection Vulnerability in PostgreSQL Driver
File: /src/Ting/Driver/Pgsql/Driver.php
Line: 443
Severity: HIGH
$sql = "SELECT currval('$sequenceName')";Issue: Direct string interpolation of $sequenceName parameter into SQL query without proper escaping or parameterization. This creates a potential SQL injection vulnerability.
Impact: An attacker could potentially execute arbitrary SQL commands if they can control the sequence name parameter.
Recommendation: Use parameterized queries or proper escaping:
$sql = "SELECT currval($1)";
$resultResource = @pg_query_params($this->connection, $sql, [$sequenceName]);Metadata
Metadata
Assignees
Labels
No labels