User-controlled SQL reaches a database query
EVIDENCE
The handler concatenates searchParams.get("q") directly into a raw SQL string before calling db.query().
WHY IT MATTERS
AI-generated CRUD endpoints often look harmless in demos. In production, this pattern can leak customer data or allow destructive queries.
FIX DIRECTION
Use parameterized queries and validate the accepted search shape before it reaches the database layer.