# CVE-2024-27920: Unsigned code template execution through workflows in projectdiscovery/nuclei

> Attackers can execute malicious code on user systems via unsigned custom workflows in the Nuclei vulnerability scanner.

- **Severity:** High 7.4 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 Mar 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-w5wx-6g2r-r78q, GO-2024-2645

## What is CVE-2024-27920?

CVE-2024-27920 is a high-severity code injection vulnerability in projectdiscovery nuclei, published on 15 Mar 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official 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.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2024-27920?

5 open source packages ship an affected version, including github.com/projectdiscovery/nuclei/v3, github.com/projectdiscovery/nuclei and github.com/projectdiscovery/nuclei/v2. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/projectdiscovery/nuclei/v3` | Go | From 3.0.0 | 3.2.0 |
| `github.com/projectdiscovery/nuclei/v3` | Go | From 3.0.0 | 3.2.0 |
| `github.com/projectdiscovery/nuclei/v3` | Go | From 3.0.0 | 3.2.0 |
| `github.com/projectdiscovery/nuclei` | Go | All versions | None |
| `github.com/projectdiscovery/nuclei/v2` | Go | All versions | None |

Products: Projectdiscovery Nuclei.

## How do I fix CVE-2024-27920?

Upgrade github.com/projectdiscovery/nuclei/v3 to 3.2.0 or later.

## Is CVE-2024-27920 being exploited?

There is no known exploitation of CVE-2024-27920 in the wild and no public exploit code.

## Other vulnerabilities in projectdiscovery nuclei

- [CVE-2023-37896](https://insights.sbomify.com/CVE-2023-37896/): Nuclei Path Traversal vulnerability (high 7.5)
- [CVE-2024-43405](https://insights.sbomify.com/CVE-2024-43405/): Nuclei Template Signature Verification Bypass (high 7.4)
- [CVE-2026-41646](https://insights.sbomify.com/CVE-2026-41646/): Nuclei: Local File Read via require() Module Loader Bypass (medium 5.5)
- [CVE-2026-41645](https://insights.sbomify.com/CVE-2026-41645/): Nuclei: Environment variable disclosure via Response-Derived DSL Expressions (medium 5.3)
- [CVE-2026-41282](https://insights.sbomify.com/CVE-2026-41282/): Code injection in Nuclei (medium 4.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-27920 and fix it if it is affected.

What it is: CVE-2024-27920 is a high-severity code injection vulnerability in projectdiscovery nuclei, published on 15 Mar 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-27920 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/projectdiscovery/nuclei/v3 (Go): affected from 3.0.0; fixed in 3.2.0
- github.com/projectdiscovery/nuclei/v3 (Go): affected from 3.0.0; fixed in 3.2.0
- github.com/projectdiscovery/nuclei/v3 (Go): affected from 3.0.0; fixed in 3.2.0
- github.com/projectdiscovery/nuclei (Go): affected all versions; no fix listed
- github.com/projectdiscovery/nuclei/v2 (Go): affected all versions; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-27920/ (Markdown: https://insights.sbomify.com/CVE-2024-27920/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-27920
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-27920
- OSV: https://osv.dev/vulnerability/CVE-2024-27920

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-27920/
Summaries are generated and may contain mistakes; the official description above is the record.
