github.com/projectdiscovery/nuclei/v3
Affected
- introduced
3.0.0, fixed3.3.2(semver)
Fixed versions
3.3.2
Fix
- Fixed version
3.3.2go get github.com/projectdiscovery/nuclei/[email protected]
Advisory
Also known as: CVE-2024-43405, GO-2024-3114
Nuclei Template Signature Verification Bypass
Summary
A vulnerability has been identified in Nuclei's template signature verification system that could allow an attacker to bypass the signature check and possibly execute malicious code via custom code template.
Affected Component
The vulnerability is present in the template signature verification process, specifically in the signer package.
Description
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.
Affected Users
> [!NOTE]
> Code templates are disabled as default, users have to explicitly enable with -code option.
Proof of Concept
id: example-template
info:
name: Example Template
# Other benign content...
# digest: <valid_signature_for_benign_content>
# digest: <another_signature>\r
code:\r
- engine:\r
- sh\r
- bash\r
source: |\r
id\r
Patches
Mitigation
Workarounds
If you are unable to upgrade nuclei, disable running custom code templates as workaround.
Acknowledgments
We would like to thank Guy Goldenberg from Wiz who reported this to us via our security email, [[email protected]](mailto:[email protected]).
Medium Basis: The source's own band: MODERATE
3.0.0, fixed 3.3.2 (semver)3.3.2
3.3.2go get github.com/projectdiscovery/nuclei/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0