Unsigned code template execution through workflows in projectdiscovery/nuclei
Description
projectdiscovery/nuclei is a fast and customisable vulnerability scanner based on simple YAML based DSL. A significant security oversight was identified in Nuclei v3, involving the execution of unsigned code templates through workflows. This vulnerability specifically affects users utilizing custom workflows, potentially allowing the execution of malicious code on the user's system. This advisory outlines the impacted users, provides details on the security patch, and suggests mitigation strategies. The vulnerability is addressed in Nuclei v3.2.0. Users are strongly recommended to update to this version to mitigate the security risk. Users should refrain from using custom workflows if unable to upgrade immediately. Only trusted, verified workflows should be executed.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/projectdiscovery/nuclei/v3Go | >= 3.0.0, < 3.2.0 | 3.2.0 |
Affected products
1- Range: >= 3.0.0, < 3.2.0
Patches
1e86f38299765validate code template in workflows (#4822)
1 file changed · +10 −0
pkg/templates/workflows.go+10 −0 modified@@ -80,6 +80,16 @@ func parseWorkflowTemplate(workflow *workflows.WorkflowTemplate, preprocessor Pr gologger.Warning().Msgf("Could not parse workflow template %s: no executer found\n", path) continue } + if len(template.RequestsCode) > 0 { + if !options.Options.EnableCodeTemplates { + gologger.Warning().Msgf("`-code` flag not found, skipping code template from workflow: %v\n", path) + continue + } else if !template.Verified { + // unverfied code templates are not allowed in workflows + gologger.Warning().Msgf("skipping unverified code template from workflow: %v\n", path) + continue + } + } workflowTemplates = append(workflowTemplates, template) }
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- github.com/advisories/GHSA-w5wx-6g2r-r78qghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-27920ghsaADVISORY
- docs.projectdiscovery.io/templates/protocols/codeghsax_refsource_MISCWEB
- docs.projectdiscovery.io/templates/reference/template-signingghsax_refsource_MISCWEB
- docs.projectdiscovery.io/templates/workflows/overviewghsax_refsource_MISCWEB
- github.com/projectdiscovery/nuclei/commit/e86f38299765b82ad724fdb701557e0eaff3884dghsaWEB
- github.com/projectdiscovery/nuclei/pull/4822ghsax_refsource_MISCWEB
- github.com/projectdiscovery/nuclei/security/advisories/GHSA-w5wx-6g2r-r78qghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.