Miggo Logo

CVE-2024-40641:
projectdiscovery/nuclei allows unsigned code template execution through workflows

7.4

CVSS Score
3.1

Basic Information

EPSS Score
0.01907%
Published
7/17/2024
Updated
8/6/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/projectdiscovery/nuclei/v3go< 3.3.03.3.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key issues: 1) The workflow loader doesn't properly distinguish between legitimate workflow files and code templates masquerading as workflows, allowing execution through the -w flag. 2) The code execution engine processes unauthorized code blocks when they appear in workflow-context files. The combination of these flaws bypasses the -code flag requirement and signature validation. The high confidence for the workflow loader comes from its direct role in processing the malicious YAML structure, while the medium confidence for the executor compilation reflects the broader execution context handling.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry *in* * w*y to *x**ut* *o** t*mpl*t* wit*out -*o** option *n* si*n*tur*. ### **t*ils writ* * `*o**.y*ml`: ```y*ml i*: *o** in*o: n*m*: *x*mpl* *o** t*mpl*t* *ut*or: ovi* *o**: - *n*in*: - s* - **s* sour**: |

Reasoning

T** vuln*r**ility st*ms *rom two k*y issu*s: *) T** work*low lo***r *o*sn't prop*rly *istin*uis* **tw**n l**itim*t* work*low *il*s *n* *o** t*mpl*t*s m*squ*r**in* *s work*lows, *llowin* *x**ution t*rou** t** -w *l**. *) T** *o** *x**ution *n*in* pro*