/claim #5838
This pull request introduces a tokenizer-based XSS reflection context analyzer for the Nuclei fuzzing engine.
The analyzer inspects HTTP responses generated during fuzzing and determines the HTML context in which the injected payload (canary) is reflected. This enables more accurate XSS detection and improves payload selection for subsequent fuzzing attempts.
The implementation follows the existing Nuclei fuzz analyzer architecture and integrates cleanly into the analyzer registry.
The analyzer detects the following contexts:
html_texthtml_attributeevent_handlerurl_attributescript_executablescript_datastylehtml_commentIf the reflection context cannot be determined, the analyzer safely returns unknown.
Key implementation points:
golang.org/x/net/html tokenizer to safely parse HTML instead of regex-based parsing.options.FuzzGenerated.Value.This approach avoids false positives and ensures context classification aligns with real HTML parsing behavior.
New Features
Tests
Documentation
Harsh jain
@Harry-jain
ProjectDiscovery
@projectdiscovery