CVE-2026-41646: Nuclei Local File Read Vulnerability

MODERATE
Advisory Identifier: GHSA-29rg-wmcw-hpf4
CVSS 5.5
CWE-284
Published
Advisory Summary

CVE-2026-41646 is a MODERATE (CVSS 5.5) local file read vulnerability (CWE-284: Improper Access Control) affecting Nuclei libraries in the Go ecosystem. The issue involves local file read via require() module loader bypass. Remediation is available by upgrading affected packages to version 3.8.0.

CVE-2026-41646 at a Glance

CVE Identifier CVE-2026-41646
GHSA Identifier GHSA-29rg-wmcw-hpf4
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-284: Improper Access Control
Affected Product Nuclei
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-41646

To remediate this vulnerability, upgrade all affected Nuclei dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/projectdiscovery/nuclei/v3 fixed: 3.8.0
Upgrade github.com/projectdiscovery/nuclei/v3 to 3.8.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/projectdiscovery/nuclei/v3

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-41646, inspect your project dependencies for Nuclei:

inspect dependencies for github.com/projectdiscovery/nuclei/v3

Analyze the terminal output to locate any version of Nuclei in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.8.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Nuclei, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerability in Nuclei's JavaScript protocol runtime allows JavaScript templates to read local `.js` and `.json` files through the `require()` function, bypassing the default local file access restriction. **Affected Component** The issue is in the JavaScript runtime's module loading system. The goja `require()` function used a default host filesystem loader without routing through the `allow-local-file-access` check. **Description** The goja require() function in Nuclei's JavaScript protocol runtime used the default host filesystem loader, which allowed JavaScript templates to import .js and .json files from anywhere on the host filesystem, ignoring the allow-local-file-access (-lfa) option that controls file access outside the template directory. The impact is limited to `.js` and `.json` files, as goja's module loader only resolves those extensions. That said, this is still enough to expose sensitive data stored in JSON configuration files like `package.json`, credential stores, or cloud configuration files sitting on the host filesystem. **Affected Users** - **CLI users** running untrusted or third-party JavaScript templates. - **SDK users** who have integrated Nuclei into platforms where end-users can supply JavaScript templates, especially when relying on the default file access restriction to limit filesystem reads. > [!NOTE] The `require()` module loader only resolves `.js` and `.json` files. Other file types cannot be read through this vector. **Patches** - The vulnerability is fixed in Nuclei v3.8.0. Upgrading is strongly recommended. - Fix reference: #7332 **Mitigation** Upgrade to Nuclei v3.8.0, where the `require()` registry is rebuilt per execution and file-backed module loads are routed through the same `allow-local-file-access` check as the rest of the filesystem operations. In the meantime, avoid running JavaScript templates from unverified sources. **Workarounds** If upgrading is not an option, avoid running untrusted JavaScript templates entirely. There is no flag or configuration that mitigates this on affected versions. **Acknowledgments** Nuceli thanks @AkashHamal0x01 for reporting this issue through responsible disclosure via security@projectdiscovery.io

CVE-2026-41646 Affected Nuclei Versions

1 component(s)
Fixed Versions:
3.8.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/projectdiscovery/nuclei/v3
Go
≥ 3.0.0
< 3.8.0
3.8.0

References

Frequently Asked Questions

What is CVE-2026-41646?
CVE-2026-41646 is a security vulnerability in Nuclei involving Local File Read via require() Module Loader Bypass under CWE-284: Improper Access Control.
Which Nuclei versions are affected?
Affected versions include releases prior to 3.8.0 across affected packages: github.com/projectdiscovery/nuclei/v3.
What version fixes CVE-2026-41646?
Upgrading to 3.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/projectdiscovery/nuclei/v3 affected?
Yes, github.com/projectdiscovery/nuclei/v3 is affected in releases prior to 3.8.0. Upgrade your dependency to 3.8.0 or later.
What is the CVSS score of CVE-2026-41646?
CVE-2026-41646 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-41646?
CVE-2026-41646 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check Go dependencies for CVE-2026-41646?
Run the dependency tree command: 'inspect dependencies for github.com/projectdiscovery/nuclei/v3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-29rg-wmcw-hpf4",
  "modified" : "2026-06-08T20:09:36Z",
  "published" : "2026-04-22T19:58:47Z",
  "aliases" : [ "CVE-2026-41646" ],
  "summary" : "Nuclei: Local File Read via require() Module Loader Bypass",
  "details" : "A vulnerability in Nuclei's JavaScript protocol runtime allows JavaScript templates to read local `.js` and `.json` files through the `require()` function, bypassing the default local file access restriction.\n\n**Affected Component**\n\nThe issue is in the JavaScript runtime's module loading system. The goja `require()` function used a default host filesystem loader without routing through the `allow-local-file-access` check.\n\n**Description**\n\nThe goja require() function in Nuclei's JavaScript protocol runtime used the default host filesystem loader, which allowed JavaScript templates to import .js and .json files from anywhere on the host filesystem, ignoring the allow-local-file-access (-lfa) option that controls file access outside the template directory.\n\nThe impact is limited to `.js` and `.json` files, as goja's module loader only resolves those extensions. That said, this is still enough to expose sensitive data stored in JSON configuration files like `package.json`, credential stores, or cloud configuration files sitting on the host filesystem.\n\n**Affected Users**\n\n- **CLI users** running untrusted or third-party JavaScript templates.\n- **SDK users** who have integrated Nuclei into platforms where end-users can supply JavaScript templates, especially when relying on the default file access restriction to limit filesystem reads.\n\n> [!NOTE]\nThe `require()` module loader only resolves `.js` and `.json` files. Other file types cannot be read through this vector.\n\n**Patches**\n\n- The vulnerability is fixed in Nuclei v3.8.0. Upgrading is strongly recommended. \n- Fix reference: #7332\n\n**Mitigation**\n\nUpgrade to Nuclei v3.8.0, where the `require()` registry is rebuilt per execution and file-backed module loads are routed through the same `allow-local-file-access` check as the rest of the filesystem operations.\n\nIn the meantime, avoid running JavaScript templates from unverified sources.\n\n**Workarounds**\n\nIf upgrading is not an option, avoid running untrusted JavaScript templates entirely. There is no flag or configuration that mitigates this on affected versions.\n\n**Acknowledgments**\n\nNuceli thanks @AkashHamal0x01 for reporting this issue through responsible disclosure via security@projectdiscovery.io",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/projectdiscovery/nuclei/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.8.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/projectdiscovery/nuclei/security/advisories/GHSA-29rg-wmcw-hpf4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41646"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/projectdiscovery/nuclei/pull/7332"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/projectdiscovery/nuclei/commit/6f2ade6a9b427c284c15a43445f9c7f055e60e5d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/projectdiscovery/nuclei"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-22T19:58:47Z",
    "nvd_published_at" : "2026-05-08T04:16:18Z"
  }
}