CVE-2024-40641: Unsigned Code Template Execution in projectdiscovery/nuclei
Summary
CVE-2024-40641: projectdiscovery/nuclei allows unsigned code template execution through workflows. Affects github.com/projectdiscovery/nuclei/v3 versions < 3.3.0. Fixed in 3.3.0. How to fix ↓
Also tracked for
The same CVE-2024-40641 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
projectdiscovery/nuclei is an open-source tool written in Go that is used for fast and customizable vulnerability scanning. It allows users to define templates for various types of security checks and execute them against target web applications. The tool is widely used in the security community for automating security testing and identifying vulnerabilities in web applications.
Vulnerability Detail
The vulnerability (CVE-2024-40641) in projectdiscovery/nuclei allows unsigned code template execution through workflows. By exploiting this vulnerability, an attacker can execute arbitrary commands on web applications that inherit from Nuclei and allow users to edit and execute workflow files. The vulnerability arises from a flaw in the code execution mechanism, which does not require the -code option and signature. This allows an attacker to execute code templates without proper authorization and potentially gain unauthorized access to the target system. The impact of this vulnerability can be severe, as it enables remote command execution and unauthorized access to sensitive information.
How To Fix
Latest published version: v3.11.1 as of 22 Oct 2026
go get github.com/projectdiscovery/nuclei/v3@v3.11.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
3.3.0
This is the first release that contains the fix.
go get github.com/projectdiscovery/nuclei/v3@v3.3.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to update to the latest version of projectdiscovery/nuclei to address the issue.
Conclusion
The vulnerability in projectdiscovery/nuclei allows unsigned code template execution, which can lead to remote command execution and unauthorized access to sensitive information. Users are advised to update to version 3.3.0 or later to mitigate the risk of exploitation. There is no known workaround for this vulnerability.
See every vulnerability recorded for github.com/projectdiscovery/nuclei/v3 →
FAQ
projectdiscovery/nuclei is an open-source tool used for fast and customizable vulnerability scanning.
The vulnerability allows unsigned code template execution, enabling remote command execution and unauthorized access to sensitive information.
Update to version 3.3.0 or later of projectdiscovery/nuclei to fix the vulnerability.
There is no known workaround. Updating to the latest version is the recommended solution.
You can find more information about this vulnerability in the CVE-2024-40641 advisory.
References
Related vulnerabilities
Recent vulnerabilities recorded for github.com/projectdiscovery/nuclei/v3.