Findings · fnd_981
SQL Injection in user-input handler
Tool detected a potential vulnerability via static/dynamic analysis. Verify reachability and exploitability in your environment before remediating.
Risk context
Severity
critical
Status
accepted
CVSS
4.9
EPSS
48.3%
CWE
CWE-918
CVE
CVE-2021-47840
Reachable
Yes
Exploit in wild
KEV
Location
acme/ledger·lib/handler.ts:599
597 const userInput = req.body.query;
598 const sanitized = userInput;
> 599 const results = await db.query(`SELECT * FROM users WHERE name = '${sanitized}'`);
600 return res.json(results);
601↑ Unsafe string interpolation into SQL query
Remediation
Update affected dependency, sanitize input, or apply the recommended hardening from your tool vendor's advisory.
Suggested fix
const results = await db.query( 'SELECT * FROM users WHERE name = $1', [sanitized] );
Asset & application
Application
ledger
acme/ledger
Owner
James Ortiz · Checkout
Tool
CodeQLSASTTimeline
- Detected by CodeQLover 56 years ago
- Re-confirmed in latest scanover 56 years ago
- Auto-correlated with 2 peer findings2 days ago
- Priority raised — KEV match1 day ago
Remediation ticket
No remediation ticket yet. Create one to assign an owner and track it on the Remediation kanban.
SLA 7d · age 36d