Skip to content

Data leaks and response signatures ​

Symptoms of data leak protection (masking and blocking sensitive values in answers) and of the response signature rules that look for leaked internals in answers.

Answers are refused with 502 and a dlp.* event ​

  • Cause: a detector or pattern with action: block found something. A rule reached its block_at count. There are more than 1,000 values to mask. Or a value must be masked in an answer longer than response.max_body: only its first part is read, the rest likely holds more values, and it would pass unmasked.
  • Check: the event's message (answer refused: ...) and masked snippet; the answer's size against response.max_body (waap response get -app NAME).
  • Fix: change the rule's action or block_at; raise response.max_body (at most 16 MiB); or add an exception for the rule on that path (ignore_rules: [dlp.card]), or a dlp.skip path.

Values are masked that are not sensitive (an order number shows as ****) ​

  • Cause: a number passes the card checks (issuer prefix, length and Luhn: one random 16-digit number starting with 4 in ten). Or a custom pattern is broader than intended. Or a dictionary word is also an ordinary word.
  • Check: the event (rule ID, masked sample, offset) and the answer's trace step.
  • Fix: add an exception for the rule on the path, narrow the pattern, or raise min_count.

Sensitive values are not masked ​

  • Cause: DLP or the application is in detect mode. The content type is not in the response scope (response.content_types), or the path is in response.skip or dlp.skip. The upstream compressed the answer with br or zstd, which is not decoded (see waap_response_bodies_total{result="encoded"}). An exception ignores the rule. Or the value is written in a form the detector does not read: an SSN without dashes, a lower-case IBAN, a card number split by other characters, or grouped card numbers in a long space-separated list.
  • Check: the answer's trace (the dlp step shows body: masked ..., would_change, or skipped); waap_dlp_matches_total. Paste a sample into Test a text on the Data leaks page (or run waap dlp test). If the test masks it, the settings are right and the cause is the scope, the mode or the compression above.
  • Fix: use block mode; add the content type; or add a custom pattern for the form used.
  • Note: older builds could mask the trace but send the browser unmasked values on a page that also received CSRF form tokens, because the adapter sent the data plane the first body edit rather than the last. If the trace and the received page disagree on a current version, report it with the event ID.

A JSON client fails to parse a masked answer ​

  • Cause: this should not happen. Masking keeps quotes, separators, escapes and the length. A custom pattern that matches across a string boundary can mask characters a client relies on, such as the letters of a key name.
  • Check: the pattern, and the masked answer in a test request.
  • Fix: anchor the pattern to the value ("EMP-[0-9]{6}" rather than EMP.*).

Answers are refused by CRS rules 950xxx to 956xxx ​

  • Cause: signatures.response_body is on, and the answer contains text that the response rules treat as a leak: an SQL error message, a stack trace, a directory listing, source code, or web shell markers. Sometimes this is legitimate, such as a help page about SQL errors.
  • Check: the event's rule IDs and snippet.
  • Fix: fix the leak in the application. For legitimate pages, add an exception for the rule ID on the path, or add the path to response.skip.

Response latency rose after turning on response signatures ​

  • Cause: the CRS response rules cost about 5 to 10 ms per 64 KiB answer.
  • Check: the trace's signatures response_body step duration.
  • Fix: add response.skip for large answers that do not need checking, lower response.max_body, or turn it off where it is not needed.