What’s Vulnerable › Vulnerabilities
CVE-2026-63728: Gitleaks Secret Exfiltration via Non-Hermetic Sprig Template Functions in Report Template Feature
- Severity: medium (CVSS 6.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-07-21 · updated 2026-07-22
- Weakness: CWE-1336
Description
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.
Affected products
- gitleaks: before 8.30.1 — fixed in 8.30.1
How to fix
Upgrade to a fixed version: gitleaks 8.30.1. Check the vendor advisory for mitigations.
References
- https://fatihhcelik.github.io/posts/gitleaks-abusing-sprig-for-exfiltration/#the-fix
- https://github.com/gitleaks/gitleaks
- https://github.com/gitleaks/gitleaks/commit/83d9cd684c87d95d656c1458ef04895a7f1cbd8e
- https://www.vulncheck.com/advisories/gitleaks-secret-exfiltration-via-non-hermetic-sprig-template-functions-in-report-template-feature
- https://fatihhcelik.github.io/posts/gitleaks-abusing-sprig-for-exfiltration/#the-fix
Get alerted when CVE-2026-63728 or the next vulnerability affects your stack