High severityPHPInjectionHIGH confidence
SQL Injection String Interpolation
A request parameter is interpolated or concatenated directly into a SQL query string (CWE-89).
Standards mapping
- OWASP Top 10
- A03:2021 - Injection
- OWASP ASVS
- V5.3.4 (L1)
Vulnerable vs. safe
Flagged by this check
$db->query("SELECT * FROM users WHERE name = '{$_GET['name']}'");Passes - the safe pattern
$stmt = $db->prepare("SELECT * FROM users WHERE name = ?");Why it matters & how to fix it
A request parameter is interpolated or concatenated directly into a SQL query string (CWE-89). This is exploitable SQL injection. Replace with a prepared statement using bound parameters (PDO::prepare/execute or mysqli bind_param).
References
Rule ID integsec-php-sql-injection-string-interpolation - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - InjectionCode Injection Tainted Input
- JavaScript / TypeScript - InjectionEval Dynamic Argument
- JavaScript / TypeScript - InjectionNoSQL Query From Request
- JavaScript / TypeScript - InjectionNoSQL Where Operator
- JavaScript / TypeScript - InjectionOS Command Injection Tainted Input
- JavaScript / TypeScript - InjectionSQL Injection String Concatenation