Injection (Navin Security)
Overview
Find SQL, NoSQL, LDAP, XPath, command, template and XSS injections by tracing untrusted data into interpreters.
Default posture is read-only and non-destructive: report evidence and a proposed fix, never exploit, extract data or change the target.
When it applies
- Triggers: database, web, api.
- Families: injection.
Controls covered
| Control |
Level |
Check |
| C1.01 |
L1 |
SQL/NoSQL/LDAP/XPath injection |
| C1.02 |
L1 |
XSS reflected, stored and DOM |
| C1.03 |
L1 |
SSTI and template injection |
| C1.04 |
L1 |
Command injection and RCE |
Engines
- Registered scanners (use
navin.security.scanners, results arrive as normalized findings): semgrep, bandit.
- Other engines named by the catalog: navin_dataflow, navin_rules, sqlmap, zap. Use one only when it is installed.
- A scanner that is not installed or did not run means the check was not done, not that it passed.
Method
- Locate every query builder, shell call, template render and HTML sink; prefer the registered scanners' hits as the starting list.
- For SQL: string formatting or concatenation into
execute, ORM raw fragments, dynamic ORDER BY and column names.
- For commands:
shell=True, os.system, exec, argument injection through leading dashes, unvalidated filenames.
- For templates and HTML: server-side template strings built from input,
dangerouslySetInnerHTML, innerHTML, unescaped output.
- Confirm with a harmless probe on a running target (a quote, a marker string,
{{7*7}}); never extract data or run a payload that changes state.
- Write the fix as parameterization or an allow-list, not as a blacklist of characters.
Evidence and status
potential: a rule or a suspicion with static evidence only.
confirmed: a dataflow trace from a controlled source to the sink, or a dynamic observation on the running target.
exploitable: a non-destructive reproduction showed the impact, in an authorized environment.
- Every finding carries file and line or endpoint, the evidence, impact, a concrete fix and the control ids above.
Anti-patterns
- Recommending input sanitizing where parameterization is the fix.
- Running time-based or destructive payloads against a shared environment.
- Treating a clean scan as proof of security: say which controls were not assessed.
1---2name: security-injection3description: Find SQLi, XSS, SSTI, XXE and command injections. Loaded by the Navin Security router for the matching stack or findings; also usable on its own.4metadata:5 source: https://skillmd.com/skills/navinspire-ia/security-injection6 navin:7 emoji: 🛡️8 category: security9---1011# Injection (Navin Security)1213## Overview1415Find SQL, NoSQL, LDAP, XPath, command, template and XSS injections by tracing untrusted data into interpreters.16Default posture is read-only and non-destructive: report evidence and a proposed fix, never exploit, extract data or change the target.1718## When it applies1920- Triggers: database, web, api.21- Families: injection.2223## Controls covered2425| Control | Level | Check |26|---|---|---|27| C1.01 | L1 | SQL/NoSQL/LDAP/XPath injection |28| C1.02 | L1 | XSS reflected, stored and DOM |29| C1.03 | L1 | SSTI and template injection |30| C1.04 | L1 | Command injection and RCE |3132## Engines3334- Registered scanners (use `navin.security.scanners`, results arrive as normalized findings): semgrep, bandit.35- Other engines named by the catalog: navin_dataflow, navin_rules, sqlmap, zap. Use one only when it is installed.36- A scanner that is not installed or did not run means the check was not done, not that it passed.3738## Method39401. Locate every query builder, shell call, template render and HTML sink; prefer the registered scanners' hits as the starting list.412. For SQL: string formatting or concatenation into `execute`, ORM raw fragments, dynamic `ORDER BY` and column names.423. For commands: `shell=True`, `os.system`, `exec`, argument injection through leading dashes, unvalidated filenames.434. For templates and HTML: server-side template strings built from input, `dangerouslySetInnerHTML`, `innerHTML`, unescaped output.445. Confirm with a harmless probe on a running target (a quote, a marker string, `{{7*7}}`); never extract data or run a payload that changes state.456. Write the fix as parameterization or an allow-list, not as a blacklist of characters.4647## Evidence and status4849- `potential`: a rule or a suspicion with static evidence only.50- `confirmed`: a dataflow trace from a controlled source to the sink, or a dynamic observation on the running target.51- `exploitable`: a non-destructive reproduction showed the impact, in an authorized environment.52- Every finding carries file and line or endpoint, the evidence, impact, a concrete fix and the control ids above.5354## Anti-patterns5556- Recommending input sanitizing where parameterization is the fix.57- Running time-based or destructive payloads against a shared environment.58- Treating a clean scan as proof of security: say which controls were not assessed.