
How to Investigate WAF Alerts: Tell Whether an Exploit Attempt Against Your App Worked
A WAF alert is a record that a web application firewall flagged one or more requests to one of your web apps or APIs, along with what the firewall did with them. A request may have matched an attack rule, looked like a bot or broken a rate limit, and the firewall may have blocked it, challenged it, or let it through and only logged it.
In the weeks after React2Shell (CVE-2025-55182) went public on December 3, 2025, researchers found 20 different ways past the WAF protections Vercel had built for it. Vercel paid $50,000 for each one, $1 million in all, for a flaw that let unauthenticated attackers run code on servers using vulnerable versions of React Server Components. So a block on one version of an exploit does not tell you whether another version got through.
WAF alerts also fire on bots, credential stuffing and rate limits. This guide covers the alerts a WAF raises on exploit attempts, such as SQL injection, command injection, path traversal and rules written for specific CVEs, and how to tell whether one worked. Cross-site scripting is left out, since its payload runs in a visitor's browser and needs checks of its own.
A WAF alert on an exploit attempt records what the firewall did with the requests it flagged, and whether the attack worked depends on three things the alert usually leaves out: whether any version of the request reached the application, how the application responded, and what the server, database or network did next. The sections below walk through those three checks in the order an analyst runs them, then show how to turn the results into a determination, the step that closes any alert triage.
{{ebook-cta}}
What a WAF alert records, and what it leaves out
WAF log analysis starts with the alerting event itself, or with the requests behind it when the alert reports a spike or a threshold, such as a Cloudflare Security Events Alert. The fields to read first are the rule ID and rule group, the action, the part of the request the rule matched, the client IP and ASN, the URI, method and query string, the headers, the request ID, and any labels or attack scores the WAF adds. AWS WAF records the client's ASN, in clientAsn, only when a rule uses an ASN match statement.
Then check what your WAF logs leave out. AWS WAF logs carry the request's metadata, such as clientIp, uri, args, httpMethod and headers, but no field holds the request body. For SQL injection and cross-site scripting matches, the log adds match details in terminatingRuleMatchDetails or ruleMatchDetails, and oversizeFields notes when an inspected body ran past the inspection limit.
The status code is a similar gap. In AWS WAF, responseCodeSent records a code only when the WAF sent a response of its own, such as a custom response or a CAPTCHA puzzle, so the log does not show how your application answered. Cloudflare's HTTP request logs do carry the origin's answer in OriginResponseStatus, where 0 means no response came from the origin and Cloudflare's edge served one. On a zone that runs a Worker, a 0 can also come from a Workers subrequest to the origin.
Some WAFs can record the matched payload if you turn it on. Cloudflare's payload logging, for example, keeps the string that triggered a managed rule and the text around it, on Enterprise plans, configured per managed ruleset and encrypted with your public key. Other WAFs differ again, so confirm what yours records before you rely on it.
Was the request blocked, challenged or only logged?
Read the action next. A rule can match a request and still let it through. A block can also come after the application has run: rules that inspect responses, such as the OWASP Core Rule Set's data leakage and web shell rules, stop only the response.
In AWS WAF, action holds the terminating action (such as ALLOW, BLOCK, CAPTCHA or CHALLENGE), and terminatingRuleId names the rule or rule group that applied it, with a group's matching rule in ruleGroupList. A rule set to Count records its match in nonTerminatingMatchingRules and lets the request continue, so a log line can show a SQL injection match on a request the WAF allowed. Inside a managed rule group, a rule overridden to Count is recorded as an action and overriddenAction pair in ruleGroupList, or in the group's excludedRules under the legacy exclude option. When a whole rule group is set to Count, its ruleGroupList entry still shows the matching rule's own action, such as BLOCK, so go by the top-level action.
In Cloudflare's logs, SecurityAction holds the terminating action, and SecurityActions lists every action Cloudflare's security products took on the request, such as block, managedChallenge, log or skip. The Log action does not stop the request and is available only on Enterprise plans.
Other WAFs have their own way to record a match without blocking it, and vendors such as Google recommend trying new rules that way first. So a match recorded in any of these modes may belong to a request that reached your application:
- Azure WAF: in Detection mode, the WAF logs matches without blocking them (the WAF log has to be turned on in diagnostic settings), and on Application Gateway, a request whose total anomaly score reaches the threshold carries the action value
Detected. In Prevention mode, a match logged asMatchedonly adds to the request's anomaly score, so check for aBlockedentry with the sametransactionIdbefore treating it as stopped. - Google Cloud Armor: a rule in preview mode does not act on the request; when it would have applied, the request log shows it in a
previewSecurityPolicyentry (logging is off by default for new backend services and follows the load balancer's sample rate). - Akamai App & API Protector: an attack group set to the Alert action records the trigger without denying the request.
- Fastly Next-Gen WAF: in the Logging (Not Blocking) mode, requests that match rules with a block action are allowed.
- ModSecurity: with
SecRuleEngine DetectionOnly, rules run but no disruptive action, such as a block or deny, is carried out. WithSecRuleEngine Onand the OWASP Core Rule Set's anomaly scoring, a matching rule only adds to the request's score, and the request is blocked if the total reaches the threshold.
A challenge screens out clients that cannot solve it. AWS WAF logs a failureReason in challengeResponse or captchaResponse when the challenge stopped the request, and Cloudflare's SecurityActions records a pass with a value ending in Solved or Bypassed. A request that passed one still carried the attacker's payload, so a passed challenge says nothing about whether the exploit worked.
Did any version of the attempt get past the WAF?
Pivot from the alert to the source. Pull every request from the same client IP, ASN, user agent and session in the window around the alert, including requests that matched no rule. Cloudflare's Security Events lists only requests that Cloudflare security products acted on or flagged, sampled when traffic is heavy, and AWS WAF logs can be filtered down to blocked requests. Pull unmatched requests from CDN, load balancer or web server access logs. Add the TLS fingerprint where your logs have one: AWS WAF logs ja3Fingerprint and ja4Fingerprint only for CloudFront and Application Load Balancer, and Cloudflare logs JA3Hash and JA4 for Bot Management customers.
Attackers often rotate IP addresses, so also search for the payload's distinctive strings across all clients. For a rule written for a recent CVE, extend that search to before the rule went live, since attempts sent earlier could not match it. Look for the same attack in forms the rule did not match, such as a different encoding, changed letter case or inserted comments, the payload moved into a JSON or multipart body, or split across repeated parameters. AWS WAF logs and default Apache and nginx access logs omit request bodies, so body variants that matched no rule need another source, such as application logs that record bodies or a decrypted packet capture.
Next, check the size of the request body. AWS WAF inspects the first 8 KB of the body for Application Load Balancer and AWS AppSync, and by default the first 16 KB for CloudFront, API Gateway and the other services AWS lists, a default you can raise to 64 KB.
What happens past the limit depends on each rule's oversize handling: Continue inspects only what fits, Match treats the request as a match, and No match treats it as not matching the rule. Outside the AWS console, the default is Continue, and the CrossSiteScripting_BODY, GenericLFI_BODY, GenericRFI_BODY and EC2MetaDataSSRF_BODY rules in the AWS Core rule set also use Continue. So do SQLi_BODY and SQLiExtendedPatterns_BODY in the SQL database rule group.
An exploit padded with junk data past the inspection limit can carry its payload where a Continue rule never looks, and if no other rule catches it, the request passes with no match and no alert. In the AWS Core rule set, SizeRestrictions_BODY blocks bodies over 8 KB. But AWS's fix for blocked file uploads is to set that rule to Count and add a larger size limit of your own, so check how your web ACL treats large bodies before you rule out padding. To find requests whose inspected body ran past the limit, filter AWS WAF logs for REQUEST_BODY or REQUEST_JSON_BODY in oversizeFields.
Finally, look for requests the WAF never saw. Hosts or paths without the WAF in front of them let an attacker skip it, and a rule exclusion can exempt a path from the rule that would have caught the attack.
An origin server that answers requests sent straight to its IP address skips the WAF too. Cloudflare advises blocking all traffic that does not come from Cloudflare IP addresses at the origin. An allowlist of Cloudflare IP addresses still admits requests an attacker routes through their own Cloudflare account, past your zone's WAF rules, so search the origin's own access logs for the same client either way.
How did the application respond?
Join the WAF event to the CDN, load balancer or web server logs, by request ID where the ID carries through, or by timestamp and client IP where it doesn't. Behind a CDN or an HTTP load balancer, the web server's access log records the proxy's address by default. Join on the client address the proxy passes in a header instead, such as CF-Connecting-IP or the X-Forwarded-For entry your outermost proxy added, where your logs keep it. Then read the status code, response size and response time of each request the application received. Compare them with that endpoint's normal traffic and with the attacker's own earlier probes.
SQL injection detection after the WAF
To detect SQL injection that worked, look for the trace each technique leaves in responses. The OWASP Web Security Testing Guide describes the same techniques from the tester's side:
- Error-based: database error messages or HTTP 500 responses on the injected parameter. A WAF running the OWASP CRS with response body access turned on can flag those error messages with its SQL data leakage rules.
- Boolean-based: responses that differ in size or content between true and false conditions.
- Time-based: response times that match a delay in the payload, such as
SLEEP(10). Apache's and nginx's default log formats leave out response time, so take it from load balancer or CDN logs that record it, such as the Application Load Balancer'starget_processing_time(access logging is off by default). - UNION-based: forged query results inside the response, which can make it larger than that page's normal responses.
- Out-of-band: DNS or HTTP requests from the database server to a domain the attacker controls, covered in the next section.
Other injection classes leave similar traces. For command injection, look for command output in the response, delays from a sleep or ping in the payload, and lookups to an outside domain. For path traversal, look for responses whose size matches the system file the payload asked for rather than the page that path normally serves.
A response holding query results or command output the page would never show, such as rows from another table or the output of whoami, shows the injection ran. Rule out an application that simply echoes the input back, which can look the same. Default access logs leave out response content, so reading it takes a source that keeps response bodies, such as a decrypted packet capture.
The other signals have benign look-alikes: many applications return 200 with an error page, dynamic pages vary in size, slow responses have many causes, and a 500 can mark a vulnerable parameter even when no data came back. Look for two signals that agree before you call an attempt successful.
What did the server, database and network do next?
If the payload ran, it usually left a trace on the server, the database or the network. On web and application servers with EDR, look for a worker process such as w3wp.exe, php-fpm, httpd, nginx, java or node starting a shell, a script interpreter or a network tool such as curl or wget.
Some applications start other programs by design, for image conversion or PDF rendering for example. So baseline each application's normal child processes and alert on anything outside that list, then follow the steps for EDR alert investigation on a hit. An exploit that stays inside the worker, reading files or querying the database through the application, starts no new process, so run the checks below even when the process tree is clean.
Check the web root for new or changed script files in the window, and compare its contents with a known-good copy, since deployments and updates change scripts too. A web shell can also run only in memory, as it did on the Confluence servers Volexity investigated in 2022, so a clean web root does not rule one out. Look for persistence the web server's account could create, such as user cron jobs and SSH keys, and for new administrator accounts in the application. When the evidence points to a dropped script, switch to the steps to investigate a suspected web shell.
On the database, read the audit and error logs for the window, where they are enabled. Look for unusual or stacked queries from the application's account, new database users, COPY commands that name a file or program on PostgreSQL and, on SQL Server, xp_cmdshell being turned on or run. xp_cmdshell is disabled by default on new installations, so a change to it needs an explanation. Each run starts cmd.exe under sqlservr.exe, which EDR on the database server records even where database auditing is off, though admin and monitoring jobs can start it too.
Out-of-band payloads make the server reach out. In DNS and proxy logs, look for lookups and requests from app servers to out-of-band testing services, such as interactsh (oast.pro, oast.live and its other default domains) and Burp Collaborator (oastify.com and burpcollaborator.net), and to destinations the server has never contacted before. In AWS, VPC Flow Logs do not record queries to the Amazon DNS server, so look in Route 53 VPC Resolver query logs, which cover only the VPCs you choose.
A lookup from the app server itself usually means the payload ran far enough to make the server resolve or fetch a name, unless the feature it targeted fetches user-supplied URLs by design. Check which host made it, since other systems that handle the request can resolve names in it too, and check who owns any scan, since authorized scanners use the same services. A lookup from one of those other systems, such as a log pipeline, can also mean the payload ran there.
Server-side request forgery against cloud workloads often aims at the instance metadata service at 169.254.169.254, which hands out the instance role's credentials. VPC Flow Logs do not record traffic to that address, and IMDSv2's session token blocks most SSRF attempts on instances that require it. So check where the credentials were used: GuardDuty raises UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS when instance credentials are used from outside AWS, and an InsideAWS finding when they are used from another AWS account. GuardDuty has to be enabled, can stop flagging a source it sees repeatedly, and flags calls through another account's VPC endpoint only for some services. Also search CloudTrail for calls whose userIdentity.arn carries the instance ID, and check each call's sourceIPAddress and vpcEndpointAccountId.
If data left through the application, run the data exfiltration checks next. In MITRE ATT&CK terms, the exploit attempt is T1190 (Exploit Public-Facing Application), a web shell that follows it is T1505.003, and credential theft through the metadata service is T1552.005.
How to close WAF alerts with a defensible determination
Close each alert with one of four determinations and the evidence behind it, so the next analyst can see what was checked:
- Benign. The traffic was authorized or legitimate: a scheduled scan or pen test, bug bounty traffic within program rules, health checks and synthetic monitoring, internal QA, or a rule firing on a legitimate payload, such as JSON or rich text that contains SQL keywords. For a scan or pen test, check the schedule or ticket, and that the requests came from the scanner's or tester's addresses. Confirm bug bounty traffic with the program, since anyone can send the headers researchers add to identify themselves. If an authorized test's payload worked, the app has the flaw, so check whether anyone else sent the same payload. Recurring WAF false positives from legitimate payloads are a tuning job for detection engineering.
- Malicious, attempt failed. The WAF blocked every version of the request you found before it reached the application, or the requests that reached the application drew normal responses and the server, database and network show nothing after them. An exploit for software the target does not run, or for a version it had patched before the requests arrived, belongs here too, once a vulnerability scan or a software inventory that covers dependencies confirms it. List the sources you checked.
- Malicious, likely succeeded. A response matches the payload, or the server, database or network shows that it ran. Escalate, contain and scope. A new WAF rule cannot take back what a working exploit already exposed, so rotate the secrets the exploit could reach, such as database passwords, API keys and session signing keys. Where code ran on the host, isolate it before rotating, so an attacker still on it cannot read the new secrets.
- Inconclusive. A missing source, such as no origin logs, no request body or no EDR on the host, leaves the outcome unknown. Name the gap and what would close it. Until it closes, treat a host as possibly compromised if it ran a version the exploit targets when the requests arrived.
Worked example: php2shell in WAF and web logs
For php2shell exploitation (CVE-2026-109618 and CVE-2026-109619), the published checks start in WAF and web server logs. They look for multipart/form-data POSTs to endpoints that never take uploads, multipart requests sent with chunked transfer encoding, and, where request logging captures POST fields, the PHP_SESSION_UPLOAD_PROGRESS field.
A match there, or a PHP worker crash or memory-limit error right after one, shows the host was probed or hit but not whether the exploit worked. A PHP worker that then starts a shell or a download tool, or a new .php file in the web root, moves the alert to likely succeeded.
How Prophet AI investigates WAF alerts
Prophet AI SOC Analyst investigates every alert, WAF alerts included, by planning the questions a senior analyst would ask, like the ones above. It runs them across the data the team has connected, such as WAF and CDN logs, web server and application logs, EDR on the web tier and DNS, and reaches a determination backed by the evidence it found.
Every question and query is shown, so an analyst can check the work or rerun a query. A team can also tell Prophet AI once about its pen-test windows and authorized scanners, and later investigations account for them, with the reason shown.
When an investigation confirms a working exploit, Prophet AI Threat Hunter scopes related activity across the connected data sources and shows when the attack started as well as how far it reached. It runs curated hunts for web shell persistence, and when a severe web flaw such as php2shell emerges, hunts for it run autonomously. Every exploit-attempt alert gets a full investigation, and analysts spend their time on the attempts that got through.
A WAF alert is a record that a web application firewall flagged one or more requests to a web app or API, along with what the firewall did with them. A request may have matched an attack rule, looked like a bot or broken a rate limit, and the WAF may have blocked it, challenged it, or let it through and only logged it. Alerts on exploit attempts need a check of what happened after the WAF.
Not on its own. A block usually stops the request the rule matched, but attackers often send several versions of an exploit, and a version the rule missed, a path the WAF does not cover, or a request sent straight to the origin can still reach the application. Check the attacker's other requests, the application's responses and the server's activity before closing the alert as a failed attempt.
Look for evidence after the WAF: database errors or 500 responses on the injected parameter, responses that change between true and false conditions, response delays that match a sleep in the payload, query results inside the response, or lookups from the database server to an outside domain. Most of these signals have benign causes, so look for two that agree, and read the database audit log where it is enabled.
Start with the WAF logs, then the CDN, load balancer or web server access logs to see whether requests reached the application and how it responded. Add application and database logs, EDR on the web servers, and DNS and proxy logs for outbound connections. Check what your WAF logs record first, since some leave out the request body and the application's response status.
Most WAF alerts fire on an incoming request that looked like an attack, before or as it reaches the application, and cannot by themselves confirm what happened on the server. A web shell alert fires on the server, usually when a web server process starts a command shell or a new script appears in the web root. A web shell often follows a successful exploit, so a confirmed one changes the WAF alert's determination.
T1190, Exploit Public-Facing Application, covers attempts to exploit a weakness in an internet-facing system such as a web server or web application. When an exploit succeeds and the attacker installs a web shell, that step is T1505.003. When the attacker uses server-side request forgery to steal cloud credentials from the instance metadata service, that is T1552.005.
Insights
Definitive Guide to Detection Engineering
Where detection engineering falls short, how to close those gaps, and what it looks like in an AI-enabled SOC.



.avif)
