Skip to the yard
Waxsealai

Cloudflare WAF Adds Full Transaction Detection and Response Rules

Shipped
Shipper
Daniele Molteni
Readers
801

Cloudflare WAF can now assess request and response evidence together, then block selected origin responses. The features are available across all plans.

Cloudflare WAF Adds Full Transaction Detection and Response Rules

Cloudflare has added full transaction detection and response rules to its web application firewall (WAF), allowing customers to assess an HTTP request alongside the response it produces. The change gives security teams a way to distinguish suspicious input from evidence that an application may have been exploited, then block a matching response before it reaches the requester.

That distinction matters as vulnerability scanning becomes more adaptive. Cloudflare points to the php2shell vulnerability as an example of how a flaw in widely used software can affect applications across the Internet. Scanning agents can adjust payloads based on feedback and chain vulnerabilities, credentials and permissions. An application’s response may reveal whether an attempt worked, and provide information that helps an attacker continue.

Request inspection remains useful for stopping recognizable attacks before they reach an application. But a suspicious request can have different outcomes: the application might reject it, return an error or expose sensitive information. Full transaction detection combines request and response signals to help identify which outcome occurred.

From suspicious input to evidence of impact

Cloudflare WAF already supports managed rules, custom rules and rate limiting. Managed rules address known attack techniques and vulnerabilities; custom rules let teams use request properties such as IP address, URL path, headers and body content to shape their own policies.

Request level rules can create a tradeoff. A broad signature may catch more potential attacks, but also match legitimate traffic and disrupt an application. A narrower rule can reduce that risk while allowing ambiguous requests to reach the origin. The response can add evidence that helps resolve the ambiguity.

Consider a download endpoint targeted with a path traversal request:

GET /download?file=../../config/database.ini

A request rule could recognize the traversal pattern and block it before it reaches the application. But the request alone cannot show whether the application would return the file. It might reject the path or produce an error. If it instead returns a successful response containing configuration data, that result changes the assessment:

200 OK
Content-Type: text/plain
[database]
username=app_service
password=EXAMPLE_SECRET

Full transaction detection can correlate the traversal attempt with response content characteristic of a private configuration file. Configuration text may also appear in harmless documentation or sample downloads; the combination of suspicious access and matching response content provides stronger evidence of exposure. A response rule can then replace the origin’s reply with a Cloudflare WAF block page and HTTP 403, preventing the sensitive content from reaching the requester.

Detection informs the policy

Cloudflare separates detection from mitigation. Detections analyze traffic and attach metadata to the request and response. Rules use that information to decide what action to take. This extends the company’s always-on detection framework, which already supports request based attack signature analysis.

That separation gives teams a chance to review how detections behave on their own traffic before choosing a policy. They can examine which endpoints and signatures are involved, then decide whether to log or block. Detection results appear in Security Analytics and can be used in response custom rules or managed detections.

Cloudflare has added three response detection fields:

Field

Description

cf.waf.signature.response.confidence

Confidence values associated with matching signatures

cf.waf.signature.response.categories

Categories associated with matching signatures

cf.waf.signature.response.ref

Matching signature reference IDs, up to 10

The initial full transaction detections focus on confirming exploitation of prominent vulnerabilities by matching suspicious input with response signals that suggest a successful exploit. Cloudflare says it plans to extend detection to other cases, including data exposure and exfiltration signals. That could help teams distinguish probing from evidence of impact, including organizations without dedicated staff tuning WAF rules.

Blocking at the response phase

Response custom rules turn detection into an inline action. They evaluate request properties, response properties and detection results, then can block a matching origin response before it reaches the requester. They cannot reverse actions that have already taken place at the origin.

When a blocking rule matches, Cloudflare replaces the origin response with a WAF block page or a custom response. The controls are available in the Cloudflare dashboard under Security > Security Rules, alongside managed protections and custom rules.

One possible custom rule targets requests for an administration page when the request lacks an internal user marker and the origin returns a successful HTML page:

http.request.uri.path starts_with "/admin" and not http.request.headers["x-internal-user"][0] eq "true" and http.response.code eq 200 and http.response.headers["content-type"][0] contains "text/html"

This condition can block an unauthenticated request only when the origin actually serves the administration interface. Authentication failures, redirects and unrelated traffic do not meet the same conditions.

All customers can create up to three custom response rules, with Log and Block actions. The available fields and functions mirror those in each customer’s request custom rules plan. Rules cannot yet inspect the response body directly.

Customers on paid plans can use the cf.waf.signature.response.* fields in custom response rules, combining detection results with properties such as hostname, path, source IP or request headers. That allows policies to be scoped to a particular application context. Cloudflare says it is rolling out these fields across accounts; customers without access can contact their account team.

Managed protections and investigation

Cloudflare’s Cloudflare Managed Response Firewall Default ruleset provides a one click deployment path for full transaction detections. When a signature matches, the managed detection blocks the response and returns a standard WAF block page. Customers can adjust the ruleset’s scope, for example by restricting detection to a particular path or excluding part of an application.

Both managed and custom response rules are available on all plans, including Free. Cloudflare says its free plan detections will focus on prominent vulnerabilities, following the model used for request detections; paid customers will have access to a broader detection catalog.

When a response rule logs or blocks a transaction, the event appears in Security Events, where teams can trace it to the request context and the rule that acted. Request only and full transaction events currently appear together in the same analytics view. Response rule events are listed under the Managed Rules or Custom Rules service, and teams can filter by rule ID.

Full transaction detection is generally available for all zones proxying traffic through Cloudflare. Teams can check the rules in Security > Security Rules, review detection activity in Security Analytics and then set response policies to match their applications. The practical shift is from judging an attack by its input alone to using the origin’s response as evidence when deciding what to block.

Source: Daniele Molteni · blog.cloudflare.com

Same vesselRelated cargo