CVE-2024-43405 Nuclei Template Signature Verification Bypass

High 7.4 Published Updated

Attackers can bypass signature verification to execute malicious code via custom templates in Nuclei, affecting CLI and SDK users.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-43405?

CVE-2024-43405 is a high-severity code injection vulnerability in projectdiscovery nuclei, published on 4 Sep 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

Nuclei is a vulnerability scanner powered by YAML based templates. Starting in version 3.0.0 and prior to version 3.3.2, a vulnerability in Nuclei's template signature verification system could allow an attacker to bypass the signature check and possibly execute malicious code via custom code template. The vulnerability is present in the template signature verification process, specifically in the `signer` package. The vulnerability stems from a discrepancy between how the signature verification process and the YAML parser handle newline characters, combined with the way multiple signatures are processed. This allows an attacker to inject malicious content into a template while maintaining a valid signature for the benign part of the template. CLI users are affected if they execute custom code templates from unverified sources. This includes templates authored by third parties or obtained from unverified repositories. SDK Users are affected if they are developers integrating Nuclei into their platforms, particularly if they permit the execution of custom code templates by end-users. The vulnerability is addressed in Nuclei v3.3.2. Users are strongly recommended to update to this version to mitigate the security risk. As an interim measure, users should refrain from using custom templates if unable to upgrade immediately. Only trusted, verified templates should be executed. Those who are unable to upgrade Nuclei should disable running custom code templates as a workaround.

Weakness: CWE-78

Which versions are affected by CVE-2024-43405?

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

PackageAffectedFixed in
github.com/projectdiscovery/nuclei/v3 GoFrom 3.0.03.3.2
github.com/projectdiscovery/nuclei/v3 GoFrom 3.0.03.3.2
github.com/projectdiscovery/nuclei/v3 GoFrom 3.0.03.3.2
github.com/projectdiscovery/nuclei GoAll versionsNone
github.com/projectdiscovery/nuclei/v2 GoAll versionsNone

Products include Projectdiscovery Nuclei.

How do I fix CVE-2024-43405?

Upgrade github.com/projectdiscovery/nuclei/v3 to 3.3.2 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-43405 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-43405 exists.

Sources

Also known as GHSA-7h5p-mmpp-hgmm, GO-2024-3114.

Is CVE-2024-43405 in your software?

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

Check your SBOMs for free