CVE-2023-37896 Nuclei Path Traversal vulnerability

High 7.5 Published Updated

Attackers using the Nuclei Go SDK with custom templates can read arbitrary files due to improper path sanitization in sandbox mode.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-37896?

CVE-2023-37896 is a high-severity path traversal vulnerability in projectdiscovery nuclei, published on 4 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Nuclei is a vulnerability scanner. Prior to version 2.9.9, a security issue in the Nuclei project affected users utilizing Nuclei as Go code (SDK) running custom templates. This issue did not affect CLI users. The problem was related to sanitization issues with payload loading in sandbox mode. There was a potential risk with payloads loading in sandbox mode. The issue occurred due to relative paths not being converted to absolute paths before doing the check for `sandbox` flag allowing arbitrary files to be read on the filesystem in certain cases when using Nuclei from `Go` SDK implementation.

This issue has been fixed in version 2.9.9. The maintainers have also enabled sandbox by default for filesystem loading. This can be optionally disabled if required. The `-sandbox` option has been deprecated and is now divided into two new options: `-lfa` (allow local file access) which is enabled by default and `-lna` (restrict local network access) which can be enabled by users optionally. The `-lfa` allows file (payload) access anywhere on the system (disabling sandbox effectively), and `-lna` blocks connections to the local/private network.

Weakness: CWE-22

Which versions are affected by CVE-2023-37896?

5 open source packages ship an affected version, including github.com/projectdiscovery/nuclei/v2 and github.com/projectdiscovery/nuclei. It affects 1 product.

PackageAffectedFixed in
github.com/projectdiscovery/nuclei/v2 GoAll versions2.9.9
github.com/projectdiscovery/nuclei/v2 GoAll versions2.9.9
github.com/projectdiscovery/nuclei/v2 GoAll versions2.9.9
github.com/projectdiscovery/nuclei GoAll versions2.9.9
github.com/projectdiscovery/nuclei GoAll versions2.9.9

Products include Projectdiscovery Nuclei.

How do I fix CVE-2023-37896?

Upgrade github.com/projectdiscovery/nuclei/v2 to 2.9.9 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2023-37896 being exploited?

There is no known exploitation of CVE-2023-37896 in the wild and no public exploit code.

Sources

Also known as GHSA-2xx4-jj5v-6mff, GO-2023-1998.

Is CVE-2023-37896 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free