triage-finding
Audited by Socket on Sep 12, 2026
2 alerts found:
Securityx2The fragment contains several security weaknesses: an open redirect, an unsafe file download route vulnerable to path traversal, SQL injection-prone query construction, and an IDOR in the order route. The safe-download route has a reasonable traversal defense. The profile route lacks visible authentication middleware and may throw when req.user is undefined. The vulnerable-parse dependency cannot be assessed without its source. There is no evidence in this fragment of malware, credential theft, exfiltration, persistence, or obfuscation.
The code contains a SQL injection vulnerability because req.query.q is directly concatenated into a SQL query. It does not itself execute the query or show evidence of malware, but any caller that executes the returned string could be vulnerable. Use a parameterized query or prepared statement.