CVE-2026-76803 in Nuclei
Summary
by MITRE • 09/22/2026
Nuclei is a vulnerability scanner built on a simple YAML-based DSL. From 3.0.0 until 3.10.0, the nuclei/mysql JavaScript library does not enforce the local-file sandbox when a JavaScript template supplies the allowAllFiles MySQL DSN option. An untrusted javascript: template scanning an attacker-controlled MySQL-compatible endpoint can cause the server to issue LOAD DATA LOCAL INFILE requests for arbitrary paths, after which the scanner's MySQL client reads the files and returns their contents to the server even though -allow-local-file-access is disabled. JavaScript templates can run unsigned and without the -code flag on affected versions, and the bypass affects CLI and SDK deployments that accept untrusted templates. This issue is fixed in version 3.10.0.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 09/22/2026
The vulnerability identified within Nuclei versions ranging from 3.0.0 to 3.10.0 represents a critical failure in the enforcement of security sandboxes for JavaScript-based scanning templates, specifically impacting interactions with MySQL-compatible database endpoints. Nuclei is widely utilized as an open-source vulnerability scanner that relies on a simple YAML-based domain-specific language to define detection logic and exploitation steps. While the tool provides robust safeguards such as local file access restrictions via command-line flags like -allow-local-file-access, these protections were circumvented when JavaScript templates interacted with MySQL databases through the nuclei/mysql library. The core technical flaw lies in the handling of the allowAllFiles option within the Data Source Name configuration for MySQL connections. When a JavaScript template explicitly supplies this option to permit broad file access permissions during database operations, the scanner fails to enforce its internal local-file sandboxing mechanisms. This architectural oversight allows untrusted code executed by the scanner to bypass intended isolation boundaries that are typically enforced at other layers of the application stack.
The operational impact of this vulnerability is severe due to the specific behavior of MySQL clients regarding LOAD DATA LOCAL INFILE requests. When an attacker controls a MySQL-compatible endpoint and provides a malicious JavaScript template, they can induce the Nuclei scanner to issue these specific SQL commands targeting arbitrary file paths on the host system where the scan is being executed. Upon receiving such a request from the client, the MySQL server processes it by reading the specified local files and transmitting their contents back to the attacker-controlled database instance. Crucially, this data exfiltration occurs even if the user has explicitly disabled local file access using standard security flags during execution. This means that administrative or operational safeguards intended to prevent information disclosure are effectively nullified by the specific code path triggered through JavaScript templates utilizing the allowAllFiles configuration parameter.
This vulnerability affects both CLI and SDK deployments of Nuclei that accept untrusted templates, highlighting a significant risk in environments where users integrate Nuclei into automated pipelines or third-party applications without strict template vetting processes. The ability to run unsigned JavaScript templates without requiring the -code flag further exacerbates the threat landscape by lowering the barrier for exploitation. Attackers do not need sophisticated social engineering or complex setup procedures; they simply need to provide a crafted MySQL-compatible endpoint and an untrusted JavaScript template that leverages this specific configuration option. Once executed, the scanner acts as an unwitting proxy, reading sensitive local files such as configuration credentials, private keys, or other proprietary data from the host machine and sending them over the network to the attacker's server. This constitutes a classic case of Server-Side Request Forgery combined with Local File Inclusion principles, where the trusted application is manipulated into performing unauthorized I/O operations on behalf of an external actor.
From a classification perspective, this vulnerability aligns closely with CWE-94 Improper Control of Generation of Code or Script and CWE-200 Exposure of Sensitive Information to an Unauthorized Actor. The failure to enforce sandboxing rules when specific database options are enabled reflects a deeper issue in input validation and security context management within the nuclei/mysql library. In terms of attack tactics, this behavior is consistent with ATT&CK technique T1567 Exfiltration Over Web Service, as data is exfiltrated via standard network protocols to an external location, and potentially T1005 Data from Local System if the primary goal is reading local files for subsequent transmission. The vulnerability underscores the importance of strict separation between template execution contexts and system-level resource access controls, particularly when dealing with database interactions that have inherent capabilities for file manipulation.
The issue was addressed in version 3.10.0 by correcting the logic within the nuclei/mysql library to ensure that local-file sandboxing is consistently enforced regardless of the allowAllFiles option provided by JavaScript templates. Organizations and individuals using Nuclei must upgrade immediately to mitigate this risk. Beyond upgrading, it is imperative to implement strict template validation policies in any environment where untrusted inputs are processed. This includes disabling unsigned JavaScript execution unless absolutely necessary and ensuring that database connection parameters do not inadvertently enable broad file access permissions. Security teams should also audit their CI/CD pipelines and automated scanning workflows to ensure they are running the patched version of Nuclei, as continued use of affected versions poses a direct risk of sensitive data leakage through seemingly benign vulnerability scans.