Docs / Detectors / SQL Injection

SQL Injection

Attacker-controlled SQL syntax in user input. Arcis sanitizes the request boundary as defense-in-depth; parameterized queries remain your primary defense.

What it catches

Sample payload

// Before
"admin' OR '1'='1' --"

// After (sanitize mode)
"admin"

// In block mode: 403, vector=sql, rule=patterns.sql.boolean-tautology

Configuration

app.use(arcis({
  block: true,
  sanitize: {
    sql: {
      enabled: true,
      includeTimingAttacks: true  // SLEEP / BENCHMARK / pg_sleep
    }
  }
}));

Disable or dry-run

// Skip SQL detection on a route that accepts a legitimate SQL string (admin console)
app.post('/admin/run-query', arcis({ sanitize: { sql: false } }), handler);

References

Defense-in-depth only. Arcis is not a replacement for parameterized queries. Always use an ORM or prepared statements as your primary defense. Pattern matching on the request boundary is the second line.