Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Local template rendering requires a victim to run Gitleaks (UI:R, AV:L); attacker needs no privileges since they only supply the template (PR:N); reading host env and exfiltrating beyond the tool is scope-changed confidentiality-only (S:C, C:H, I:N, A:N).
AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
3DescriptionCVE.org
Gitleaks prior to 8.30.1 contains a template injection vulnerability that allows attackers who can supply or influence report templates to read arbitrary environment variables and exfiltrate sensitive data by leveraging non-hermetic Sprig template functions. Attackers can craft malicious report templates using the env, expandenv, and getHostByName functions to extract credentials, tokens, and API keys from the host process and exfiltrate them through DNS queries, including secrets discovered during the scan itself.
AnalysisAI
Sensitive data exfiltration in Gitleaks before 8.30.1 lets an attacker who controls the report template read arbitrary host environment variables through non-hermetic Sprig functions (env, expandenv, getHostByName) and smuggle them out via attacker-triggered DNS lookups. Because Gitleaks runs in CI/CD with broad access to credentials, tokens, and API keys - including the very secrets it just discovered during a scan - a malicious template turns the scanner into an exfiltration channel. A detailed public write-up describing the technique and the fix exists; there is no CISA KEV listing, so this reflects a demonstrated technique rather than confirmed active exploitation.
Technical ContextAI
The affected component is Gitleaks' report template feature, which renders output using Go's text/template engine extended with the Sprig function library. Sprig ships 'non-hermetic' helpers - functions that reach outside the template sandbox into the host process, notably env/expandenv (process environment variables) and getHostByName (DNS resolution). The root cause is CWE-1336, Improper Neutralization of Special Elements Used in a Template Engine (server-side template injection): untrusted or attacker-influenced template content is evaluated with a function set that permits host interaction. Combining env-style secret reads with getHostByName provides both the sensitive-data source and a covert egress channel (DNS), so no direct network response to the attacker is needed. The affected package is identified by cpe:2.3:a:gitleaks:gitleaks and all versions prior to 8.30.1 are in scope.
RemediationAI
Upgrade to Gitleaks 8.30.1 or later, which restricts the template engine so non-hermetic Sprig functions can no longer reach host environment variables or perform DNS resolution (Vendor-released patch: 8.30.1; fix in commit 83d9cd684c87d95d656c1458ef04895a7f1cbd8e). Until you can upgrade, treat report templates as untrusted code: do not use, accept, or merge report templates from external contributors or shared/untrusted sources, and pin templates to a reviewed, in-house version stored outside contributor-writable paths - the trade-off is losing the flexibility of per-repo custom templates. As defense in depth for CI/CD runners, scope down the job's environment so it holds only the secrets it strictly needs and add egress filtering that blocks or logs outbound DNS to untrusted resolvers/domains, which neutralizes the getHostByName exfiltration channel at the cost of some monitoring overhead. Consult the VulnCheck advisory (https://www.vulncheck.com/advisories/gitleaks-secret-exfiltration-via-non-hermetic-sprig-template-functions-in-report-template-feature) for details.
Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. Rated c
Invision Community 5.0.0 through 5.0.6 contains an unauthenticated remote code execution vulnerability in the template e
Remote code execution in the WPML WordPress multilingual plugin (versions up to and including 4.6.12) allows Contributor
Server-side template injection in Adobe Commerce, Adobe Commerce B2B, and Magento Open Source allows remote unauthentica
Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve
changedetection.io is an open source web page change detection, website watcher, restock monitor and notification servic
A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms all
Remote code execution in WGDashboard 4.3.2 and earlier lets authenticated attackers inject Server-Side Template Injectio
Gibbon through 26.0.00 allows /modules/School%20Admin/messengerSettings.php Server Side Template Injection leading to Re
Server-side template injection in the TYPO3 'Powermail' extension lets an anonymous user submit Fluid template syntax th
Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 or Swagger v2 specification execute arbitra
Server-side template injection in FOSSBilling versions prior to 0.8.0 allows authenticated administrators to execute arb
Same technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: ModerateShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-46134
GHSA-mmh4-9cvr-w4cj