Skip to main content

Nuclei EUVDEUVD-2026-28498

| CVE-2026-41645 MEDIUM
Code Injection (CWE-94)
2026-04-22 https://github.com/projectdiscovery/nuclei GHSA-jm34-66cf-qpvr
5.3
CVSS 3.1 · Vendor: https://github.com/projectdiscovery/nuclei
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Configure Nuclei with -ev flag
  2. Delivery
    Design multi-step template with extractors
  3. Exploit
    Scan attacker-controlled target
  4. Install
    Malicious server returns payload with {{env_var}} syntax
  5. C2
    Expression engine substitutes placeholder
  6. Execute
    DSL expression re-evaluated on substituted output
  7. Impact
    Environment variable exfiltrated in subsequent request

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires ALL of the following conditions: (1) Nuclei version prior to v3.8.0; (2) multi-step template execution with response-derived values (extractors or flow-based request chaining) being reused in subsequent requests; (3) target servers not fully under the operator's control (untrusted or attacker-controlled); (4) for information disclosure of environment variables, the -env-vars / -ev flag MUST be explicitly enabled by the operator (disabled by default). Without condition 4, injected expressions may trigger helper functions like {{md5()}} but lack meaningful security impact. Exploitation does not require authentication (PR:N) or special user privileges; however, AC:H (high complexity) indicates the attack requires specific template structure and careful payload crafting. The vulnerability is NOT exploitable in default Nuclei configurations because -ev is off by default, and standard templates do not expose the two-pass evaluation issue unless response reuse is explicitly designed into the template workflow.

Impact

Risk assessment reflects conflicting signals that require careful interpretation. CVSS 5.3 (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N) indicates network vector with high complexity and user interaction required, yielding moderate confidentiality impact but no integrity or availability impact. However, the tag 'RCE' (remote code execution) does not align with CVSS scope=unchanged and I:N vector - the RCE tag likely refers to arbitrary DSL execution, not OS-level code execution. The real-world risk is substantially lower than the CVSS score suggests: exploitation requires (1) -env-vars flag explicitly enabled by the operator (off by default), (2) multi-step templates with response reuse against untrusted targets, and (3) user interaction (AC:H implies manual template configuration or deliberate flag use). Information disclosure via environment variable exfiltration is the primary threat and is confirmed only when -ev is active. Without -ev, injected helper function calls have minimal security impact. The CVSS vector appropriately captures the attack complexity and the need for the operator to have enabled non-default settings. This is a real vulnerability for users who enable -ev against untrusted targets, but represents low risk for default configurations. No public exploit code or active exploitation in the wild has been reported; vendor patch is available.

Exploit ScenarioDerived

A security researcher runs a multi-step Nuclei template against a malicious target server with the -ev flag enabled. The initial request receives a crafted HTTP response containing the payload Authorization-Bearer: {{NUCLEI_ENV_API_KEY}}. The template's extractor reuses this response value in a subsequent HTTP request. During evaluation of the second request, the expression engine substitutes the extracted value, then scans it for DSL expressions. The injected {{NUCLEI_ENV_API_KEY}} is now reinterpreted as a variable reference and resolved from the environment variable map, exfiltrating the actual API key value in the subsequent request to an attacker-controlled logging endpoint. No user interaction is required beyond running the template.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 23, 2026

Expression injection in Nuclei's template evaluation engine allows malicious HTTP servers to inject and execute DSL expressions via response data reused in multi-step templates. When the -env-vars flag is enabled (off by default), attackers can exfiltrate host environment variables including API keys and credentials; without this flag, injected expressions may trigger helper functions with limited security impact. Nuclei v3.8.0+ patches the vulnerability by collecting expressions from template source before placeholder substitution, preventing response-derived data from being reinterpreted as executable DSL syntax.

RemediationAI

Upgrade to Nuclei v3.8.0 or later immediately. The patched version corrects the evaluation engine to collect and validate expressions from the original template source before placeholder substitution, preventing response-derived data from being reinterpreted as DSL syntax. Apply patches via go get -u github.com/projectdiscovery/nuclei/v3@v3.8.0 for Go module installations or download the latest release from https://github.com/projectdiscovery/nuclei/releases. If immediate upgrade is not possible, disable the -env-vars / -ev flag when scanning untrusted or attacker-controlled targets; this eliminates the information disclosure risk but does not prevent other injected helper functions from executing. Do not rely on workarounds long-term - the expression injection itself remains exploitable even without -ev enabled, and upgrade is the only complete fix. For organizations running Nuclei in CI/CD or scanning untrusted target environments, audit configurations to ensure -ev is not enabled by default in automation templates.

Affected VersionsENISA

nuclei 3.0.0, < 3.8.0

Affected Packages

go github.com/projectdiscovery/nuclei no fix
go github.com/projectdiscovery/nuclei/v2 no fix
go github.com/projectdiscovery/nuclei/v3 fix: 3.8.0
euvd nuclei_3_0_0 fix: 3.8.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 4 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Nuclei is a template-based vulnerability scanner that uses a domain-specific language (DSL) with helper functions for dynamic request generation. The vulnerability exists in the expressions.Evaluate() function (CWE-94: Code Injection) within pkg/protocols/common/expressions/. The root cause is a two-pass evaluation mechanism: first, placeholders in templates are replaced with values from prior steps or HTTP responses, then the substituted output is scanned for expressions like {{function()}} or {{variable_name}}. This design inadvertently allows response content to be reinterpreted as executable DSL. When the -env-vars flag merges environment variables into the template variable map, a malicious server can return payloads such as {{env_variable_name}} which resolve during subsequent template execution. A secondary issue in hasLiteralsOnly() validation logic caused unintended evaluation of helper expressions during variable resolution checks, triggering side-effectful operations.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/projectdiscovery/nuclei) PRIMARY 5.3 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
SUSE MEDIUM

Primary rating from Vendor (https://github.com/projectdiscovery/nuclei).

CVSS VectorVendor: https://github.com/projectdiscovery/nuclei

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
Patch released
Apr 22, 2026 - 20:01 nvd
Patch available
CVE Published
Apr 22, 2026 - 19:59 nvd
MEDIUM 5.3

DescriptionCVE.org

A vulnerability in Nuclei's expression evaluation engine makes it possible for a malicious target server to inject and execute supported DSL expressions. This happens when HTTP response data containing helper/function syntax gets reused by multi-step templates. If the -env-vars / -ev option is explicitly enabled, this can expose host environment variables. That option is off by default, so standard configurations are not affected by the information disclosure risk.

Affected Component

The issue lives in expressions.Evaluate() at pkg/protocols/common/expressions/ and in the unresolved-variable validation path (hasLiteralsOnly()).

Description

expressions.Evaluate() replaces placeholders first, then scans the substituted output for expressions. Because of this two-pass approach, response-derived values (including extractor output and response body content) can be reinterpreted as DSL/helper syntax on the second pass.

When -env-vars (-ev) is enabled, environment variables get merged into the template variable map. A malicious target can return response data containing expressions like {{env_var_name}} which, when reused in a subsequent template request, resolve to actual environment variable values. This can expose sensitive host data like API keys, credentials, and tokens.

Without -ev enabled (the default), injected DSL expressions may still trigger helper functions such as {{md5("test")}}, but this has no meaningful security impact beyond unexpected behavior.

There is also a separate issue in hasLiteralsOnly(): it was evaluating helper expressions while deciding whether {{...}} contained unresolved variables, which caused validation logic to run side-effectful helpers even when the final request kept the value as a literal.

> [!NOTE] The -env-vars / -ev option is off by default. Users who have not explicitly turned it on are not affected by the information disclosure aspect of this vulnerability.

Affected Users

  • CLI users running multi-step templates (with extractors or flow-based request chaining) that reuse response-derived values against untrusted or attacker-controlled targets, with the -ev flag enabled.
  • SDK users who have integrated Nuclei into platforms where EnvironmentVariables is set to true and scan targets are not fully trusted.

Patches

  • The vulnerability is fixed in Nuclei v3.8.0. Upgrading to this version is strongly recommended.
  • Relevant fix references: #7221, #7321.

Mitigation

Upgrade to Nuclei v3.8.0. The updated evaluation logic now collects expressions from the original template text before placeholder substitution and only evaluates those template-authored expressions.

If you have -ev enabled, disable it when scanning untrusted targets to avoid environment variable disclosure.

Workarounds

If upgrading is not an option right now, make sure -env-vars / -ev is not enabled when running multi-step templates against untrusted targets.

Acknowledgments

Nuclei thanks @gnuletik for reporting this issue through responsible disclosure via security@projectdiscovery.io

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy