Matchers are the detection mechanism in Nuclei templates that determine whether a request was successful by performing pattern matching on request/response data. They are the core logic that identifies vulnerabilities, misconfigurations, or specific conditions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/projectdiscovery/nuclei/llms.txt
Use this file to discover all available pages before exploring further.
Matcher types
Nuclei supports multiple matcher types for different matching scenarios:- Word
- Regex
- Status
- Size
- Binary
- DSL
- XPath
Match specific words or phrases in the response.
Matcher conditions
Control how multiple matchers are evaluated using conditions:The logical condition between matcher values within a single matcher.
and- All patterns must matchor- Any pattern can match
The logical condition between multiple matchers in a request.
and- All matchers must succeedor- Any matcher can succeed
Example with conditions
Matcher options
The part of the response to match against. Each protocol exposes different parts.Common HTTP parts:
body, header, all, status_code, rawReverse the match result. Only matches if the condition is NOT true.
Name for the matcher. Names should be lowercase without spaces or underscores.
Enable case-insensitive matching for word and regex matchers.
Require all values to match, ignoring the condition parameter.
Encoding for the words field. Currently supports
hex.Hide the matcher from output. Useful in flow templates for internal conditions.
Multi-request matching
When usingreq-condition: true or multiple requests, you can match across requests using indexed variables:
Real-world examples
Protocol-specific parts
- HTTP
- DNS
- Network
body- Response body (default)header- Response headersall_headers- All headers concatenatedstatus_code- HTTP status coderaw- Raw HTTP responserequest- HTTP requestcontent_length- Response content lengthduration- Request duration
Best practices
- Use specific matchers - Combine multiple matcher types to reduce false positives
- Name your matchers - Use descriptive names when working with workflows or debugging
- Use DSL for complex logic - DSL matchers provide the most flexibility for complex conditions
- Test negative cases - Use
negative: trueto exclude known false positives - Match on multiple parts - Don’t rely solely on body content; include headers or status codes
- Use internal matchers - Hide intermediate matchers in flow templates with
internal: true
Related
Extractors
Extract data from responses
Helper Functions
DSL helper functions
Flow Control
Conditional execution
Workflows
Multi-template execution