FRGet In Touch
← All posts

What OWASP ZAP stops before production: real injection attacks

October 28, 2026 · Security

Every field in an application that accepts input is a possible door: login forms, search boxes, comments, file names, URL parameters. OWASP ZAP tests those doors the way an attacker would. It runs against the live application from the outside, sends real attack payloads, and reports every one that gets through. Run on every deployment, it means a vulnerability introduced today is found today, not by someone else months later.

One clarification: ZAP does not block attacks in production. That is the job of a firewall. ZAP finds the holes so you can close them before release.

SQL injection

The classic. If a query is built by gluing user input into SQL text, an attacker can change the query itself. Typing ' OR '1'='1 into a login form can bypass the password check, and a longer payload can dump an entire table. ZAP sends payloads like these and watches for database errors, changed responses and deliberate time delays that prove the input reached the database.

// Vulnerable: input is glued into the query
q := "SELECT * FROM users WHERE email = '" + email + "'"
rows, _ := db.Query(q)

// Safe: input is sent as a parameter, never as SQL
rows, _ := db.Query("SELECT * FROM users WHERE email = $1", email)

Cross-site scripting (XSS)

If an application shows user input back without encoding it, an attacker can plant a script such as <script>alert(1)</script> in a comment or a report field. When a manager opens that page, the script runs in their browser and can steal their session. ZAP checks whether its payloads come back unescaped, both immediately (reflected) and on later pages (stored). The fix is to encode output and to avoid rendering raw HTML.

Command injection and path traversal

Any feature that touches the server’s operating system or file system is a target: exporting reports, downloading attachments, processing uploaded files. A value like ; cat /etc/passwd can run a system command, and ../../etc/passwd in a file name can read files outside the intended folder. ZAP tries both kinds of payload against every parameter it finds.

Other injections it tests for

NoSQL injection against document databases like MongoDB, XML external entity (XXE) attacks, server-side template injection, and header injection through line breaks in input. Each is another way for untrusted input to be treated as instructions.

What it will not catch

A scanner is not a full security review. ZAP does not understand business rules, so it will not notice that user A can open user B’s audit report. It only tests what it can reach, so pages behind a login need to be set up for it. And it does not look inside your dependencies or container images, which is the job of a tool like Trivy. Security comes from combining these with code review, access-control tests and secure coding habits.

The takeaway

Injection has been on the OWASP Top 10 list for years because it keeps working. Automated scanning on every deployment is a cheap way to make sure the simplest attacks fail against your application before real attackers try them.

Want this kind of security built into your delivery process?

Get in touch and tell me about your project.