Gitleaks Secret Exfiltration via Non-Hermetic Sprig Template Functions in Report Template Feature
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-1336.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA gitleaks (gitleaks) Fixed in 8.30.1
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-63728
- 2026-10-03 Alias added: GHSA-mmh4-9cvr-w4cj
References
Patch 1
More gitleaks vulnerabilities
- TI-2026-86092 World-readable Gitleaks report files via --report-path CVSS 4.0MEDIUM 4.8
Sources
- CVE-2026-63728 · CVE Program
- CVE-2026-63728 · NVD
- FIRST EPSS
- GHSA-mmh4-9cvr-w4cj · GitHub Advisory Database · CC BY 4.0
- CVE-2026-63728 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences