# SQL injection

Input changes SQL query structure instead of remaining a bound value.

**Candidate CWE:** [CWE-89](https://cwe.mitre.org/data/definitions/89.html)

## Test hypothesis

On a local fixture containing only synthetic rows, identify the quoting context and compare true/false expressions that preserve the same selected record. Inspect query logs and repeat the original baseline.

## Evidence required

Paired inputs cause reproducible SQL-semantic changes or an instrumented trace shows attacker-controlled query structure with a security consequence. Keep the proof to synthetic data.

## Rule out false positives

A quote-triggered 500, WAF rejection, reflected payload, or unrelated response timing difference is only a lead.

## Playbook and command references

- [Trace input into queries, commands, and templates](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/injection-tracing.html) — Prove interpretation at a specific sink using small paired experiments instead of payload spraying.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Trace%20input%20into%20queries%2C%20commands%2C%20and%20templates)

## Referenced by these target playbooks

[Web & API](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/web-api.html) · [OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Mobile](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/mobile.html) · [Desktop & extensions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/desktop.html) · [AI, agents & MCP](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/ai.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the [mapping guide](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html).

## Primary references

- [PortSwigger SQL injection](https://portswigger.net/web-security/sql-injection)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
