Nuclei: Local File Read via Workflow File-Protocol Gate BypassGHSA-qgw5-7j4f-fg97
MEDIUMFix: projectdiscovery/nuclei#7489GHSA-qgw5-7j4f-fg97 is a medium-severity (CVSS 5.5) CWE-284 vulnerability in github.com/projectdiscovery/nuclei/v3. A fix is available for github.com/projectdiscovery/nuclei/v3 — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-qgw5-7j4f-fg97.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-qgw5-7j4f-fg97 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/projectdiscovery/nuclei/v3Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
A vulnerability in Nuclei's workflow template loader allows file: protocol templates to execute without the -file flag, bypassing a security gate that is meant to prevent local file reads on the scanner host.
Affected Component
The issue is in the workflow template loading path. The main template loader enforces the -file gate for file-protocol templates, but the workflow loader did not apply the same check when resolving templates referenced by a workflow.
Description
Nuclei disables file-protocol templates by default because they read local files from the host running the scanner. Operators must explicitly enable them with the -file flag. When a workflow references a file-protocol template, the workflow loader accepted and executed that template without verifying that -file was enabled.
Because workflows run unsigned by default, an untrusted workflow could load and execute a file-protocol template and read local files from the scan target path, even though the operator had not enabled file templates.
[!NOTE] File-protocol templates are disabled by default. This issue only affects users who run workflows from untrusted sources without having explicitly enabled
-file.
Affected Users
- CLI users running workflows (
-w) that reference file-protocol templates from untrusted or third-party sources. - SDK users who integrate Nuclei into platforms where end users can supply workflow files and rely on the default
-filerestriction to block local file access.
Patches
- The vulnerability is fixed in Nuclei v3.10.0. Upgrading is strongly recommended.
- Fix reference: https://github.com/projectdiscovery/nuclei/pull/7489
Mitigation
Upgrade to Nuclei v3.10.0, where template execution requirements (including the -file gate) are enforced consistently across the main loader, workflow parsing, and request compilation paths.
In the meantime, avoid running workflows from unverified sources.
Workarounds
If upgrading is not an option, do not run untrusted workflow files. There is no configuration flag that mitigates this bypass on affected versions.
Acknowledgments
Thanks to @daffainfo for reporting this issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/projectdiscovery/nuclei/v3 | ≥ 3.0.0&&< 3.10.0 | 3.10.0go get github.com/projectdiscovery/nuclei/v3@v3.10.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/projectdiscovery/nuclei/v3, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/projectdiscovery/nuclei/v3 to 3.10.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qgw5-7j4f-fg97 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is GHSA-qgw5-7j4f-fg97 in your dependencies?
Find it across Go, including transitive dependencies.