CVE-2026-76803: Nuclei: Local File Read via MySQL Client Sandbox Bypass

Published Sep 22, 2026
·
Updated

A vulnerability in Nuclei's JavaScript MySQL client library allows arbitrary local file reads that bypass the -allow-local-file-access (-lfa) sandbox restriction.

Affected Component

The issue is in the nuclei/mysql JavaScript library used by javascript: protocol templates. The MySQL client connection logic did not enforce the local file access sandbox when handling the allowAllFiles DSN parameter used by LOAD DATA LOCAL INFILE.

Description

Without -lfa, Nuclei confines local file access to the templates directory. However, a javascript: template could connect to a MySQL server with allowAllFiles=true in the connection DSN. With this option enabled, a malicious MySQL server can issue LOAD DATA LOCAL INFILE requests for arbitrary paths on the scanner host. The MySQL client reads the full file contents and sends them to the server, bypassing the same sandbox that blocks direct filesystem reads through other APIs.

javascript: templates execute without the -code flag and unsigned javascript: templates run by default, making this reachable from untrusted third-party templates when scanning attacker-controlled MySQL endpoints.

[!NOTE] The -allow-local-file-access (-lfa) option is off by default. This issue allows bypassing that restriction, not merely expanding an already-enabled capability.

Affected Users

- CLI users running untrusted or third-party javascript: templates against MySQL-compatible targets. - SDK users who integrate Nuclei into platforms where end users can supply JavaScript templates and rely on the default -lfa restriction to limit filesystem access.

Patches

- The vulnerability is fixed in Nuclei v3.10.0. Upgrading is strongly recommended. - Fix reference: https://github.com/projectdiscovery/nuclei/pull/7473

Mitigation

Upgrade to Nuclei v3.10.0, where the allowAllFiles DSN option is stripped unless -lfa is explicitly enabled.

In the meantime, avoid running JavaScript templates from unverified sources, especially against untrusted database endpoints.

Workarounds

If upgrading is not an option, avoid running untrusted JavaScript templates. There is no flag or configuration that mitigates this bypass on affected versions.

Acknowledgments

Thanks to @daffainfo for reporting this issue.

Other sources

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.

MITRE

Affected Software

2 affected componentsFixes available
ProjectDiscovery nuclei>=3.0.0<3.10.0
go/github.com/projectdiscovery/nuclei/v3>=3.0.0<3.10.0
3.10.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/projectdiscovery/nuclei/v3 to a version that resolves this vulnerability.

    Fixed in 3.10.0
  2. Upgrade

    Upgrade Nuclei to a version that resolves this vulnerability.

    Fixed in 3.10.0
  3. Compensating control

    If upgrading is not an option, avoid running untrusted JavaScript templates, especially against untrusted database endpoints.

Event History

Sep 22, 2026
CVE Published
via MITRE·04:27 PM
Data Sourced
via MITRE·04:27 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·08:37 PM
Data Sourced
via GitHub·08:37 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

CLI and SDK deployments are affected if they accept untrusted JavaScript templates. The issue applies to affected versions from 3.0.0 until 3.10.0, including when local file access is disabled with -allow-local-file-access.

2

What does an attacker need to exploit the vulnerability?

An attacker needs to provide an untrusted javascript: template and have the scan target an attacker-controlled MySQL-compatible endpoint. The endpoint can request arbitrary local paths through LOAD DATA LOCAL INFILE, causing the scanner client to send file contents to the server.

3

Are unsigned JavaScript templates blocked by default on affected versions?

No. On affected versions, JavaScript templates can run unsigned and without the -code flag, allowing an untrusted template to supply the allowAllFiles MySQL DSN option.

4

What should be done if untrusted templates are accepted?

Upgrade to version 3.10.0, which fixes the issue. Until upgrading, do not accept or execute untrusted JavaScript templates and avoid scanning attacker-controlled MySQL-compatible endpoints with such templates.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203