The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41645

CVE-2026-41645: Projectdiscovery Nuclei RCE Vulnerability

CVE-2026-41645 is a remote code execution flaw in Projectdiscovery Nuclei's expression engine that lets malicious servers inject DSL expressions. This article covers the technical details, affected versions, and mitigation.

Published: May 18, 2026

CVE-2026-41645 Overview

CVE-2026-41645 is a code injection vulnerability [CWE-94] in Nuclei, the YAML-based vulnerability scanner maintained by ProjectDiscovery. The flaw exists in the expression evaluation engine of Nuclei versions 3.0.0 through 3.7.x. A malicious target server can return HTTP response data containing helper/function syntax. When that data is reused by multi-step templates, Nuclei evaluates the attacker-controlled expressions inside its Domain Specific Language (DSL) engine. If the operator launches Nuclei with the -env-vars / -ev flag, the injected expressions can read host environment variables. ProjectDiscovery patched the issue in Nuclei version 3.8.0.

Critical Impact

A hostile scan target can coerce Nuclei into executing supported DSL expressions during multi-step template runs, enabling information disclosure of host environment variables when -env-vars is enabled.

Affected Products

  • ProjectDiscovery Nuclei versions 3.0.0 through 3.7.x
  • Nuclei Go module github.com/projectdiscovery/nuclei/v3
  • Multi-step HTTP template workflows that reuse response data

Discovery Timeline

  • 2026-05-08 - CVE-2026-41645 published to NVD
  • 2026-05-08 - Last updated in NVD database

Technical Details for CVE-2026-41645

Vulnerability Analysis

Nuclei templates support a DSL with helper functions delimited by {{ }} markers. The expression engine resolves these expressions against a runtime variable map during request preparation. In multi-step HTTP templates, response data from a prior step can flow into variables used by subsequent steps. The vulnerable code in pkg/protocols/common/expressions/expressions.go did not distinguish between template-authored expressions and helper-function syntax injected by an upstream HTTP response. When the engine encountered attacker-controlled text shaped like a DSL helper call, it evaluated the call against the live variable context. With the -env-vars flag set, the variable context includes host environment variables, allowing a malicious server to exfiltrate secrets through the scanner.

Root Cause

The root cause is improper control of code generation [CWE-94] in the expression evaluator. The evaluate function in expressions.go extracted expressions from data after that data was already populated with response content. The isExpression check in variables.go further executed expr.Evaluate(nil) to validate expressions, which itself triggered helper function evaluation on untrusted strings.

Attack Vector

Exploitation requires the scanner operator to point Nuclei at a malicious target and run a multi-step template. The attacker controls HTTP response content. Successful exploitation does not yield direct code execution on arbitrary code paths, but does allow DSL helper invocation and, with -env-vars enabled, environment variable disclosure. User interaction is required and attack complexity is high because the operator must choose to scan the malicious endpoint with a vulnerable template chain.

go
// Patch: only evaluate template-authored expressions, before response data is substituted
func evaluate(data string, base map[string]interface{}) (string, error) {
    expressions := FindExpressions(data, marker.ParenthesisOpen, marker.ParenthesisClose, base)

    // replace simple placeholders (key => value) MarkerOpen + key + MarkerClose and General + key + General to value
    data = replacer.Replace(data, base)

    // expressions can be:
    // - simple: containing base values keys (variables)
    // - complex: containing helper functions [ + variables]
    // literals like {{2+2}} are not considered expressions
    for _, expression := range expressions {
        // replace variable placeholders with base values
        expression = replacer.Replace(expression, base)

Source: ProjectDiscovery Nuclei commit d2217320

go
// Patch: isExpression no longer calls Evaluate on untrusted input
if expr == nil {
    return true
}

return len(expr.Vars()) == 0

Source: ProjectDiscovery Nuclei commit 6c803c74

Detection Methods for CVE-2026-41645

Indicators of Compromise

  • Outbound HTTP responses from scanned targets containing Nuclei DSL helper syntax such as {{getenv(, {{print(, or other helper function names embedded in unusual response fields.
  • Nuclei process command lines that include the -env-vars or -ev flag combined with multi-step template execution against untrusted internet targets.
  • DNS or HTTP egress from the host running Nuclei to attacker-controlled domains shortly after a scan, suggesting environment variable exfiltration.

Detection Strategies

  • Inventory all hosts running the nuclei binary and verify the installed version is 3.8.0 or later.
  • Audit CI/CD pipelines, bug bounty automation, and SOC tooling for invocations that combine -env-vars with scanning of arbitrary or user-supplied targets.
  • Review custom multi-step templates for response data that flows into subsequent request fields without explicit sanitization.

Monitoring Recommendations

  • Log full Nuclei command-line arguments and template names from job runners to detect unsafe flag combinations.
  • Monitor egress from scanner hosts and alert on connections that follow scans of low-reputation domains.
  • Track Nuclei version drift across scanning infrastructure and fail builds that pin versions below 3.8.0.

How to Mitigate CVE-2026-41645

Immediate Actions Required

  • Upgrade Nuclei to version 3.8.0 or later on every host, container image, and CI runner.
  • Remove the -env-vars / -ev flag from all Nuclei invocations unless strictly required, and never combine it with scans of untrusted targets.
  • Rotate any secrets that were present in environment variables on hosts that ran vulnerable Nuclei builds with -env-vars enabled against external targets.

Patch Information

ProjectDiscovery released the fix in Nuclei v3.8.0. Technical details are documented in GitHub Security Advisory GHSA-jm34-66cf-qpvr and the corresponding fixes in PR #7221 and PR #7321.

Workarounds

  • Do not pass -env-vars or -ev on the command line; the option is off by default and standard configurations are not exposed to environment variable disclosure.
  • Restrict Nuclei scans of untrusted targets to single-request templates that do not reuse response data in later steps.
  • Run Nuclei inside a least-privilege container with a scrubbed environment so that any residual evaluation has no secrets to read.
bash
# Pin Nuclei to a fixed version and confirm patch level
go install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@v3.8.0
nuclei -version

# Safe invocation: omit -env-vars/-ev when scanning external targets
nuclei -u https://target.example.com -t http/cves/ -severity high,critical

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechProjectdiscovery Nuclei

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Nuclei Release v3.8.0
  • Vendor Resources
  • GitHub Nuclei Commit Update

  • GitHub Nuclei Commit Update

  • GitHub Nuclei Pull Request

  • GitHub Nuclei Pull Request

  • GitHub Security Advisory GHSA-jm34-66cf-qpvr
  • Related CVEs
  • CVE-2026-41282: Nuclei DSL Expression Injection RCE Flaw

  • CVE-2024-43405: Projectdiscovery Nuclei RCE Vulnerability

  • CVE-2026-41646: Nuclei Path Traversal Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English