CVE-2026-63728
Received Received - Intake

Template Injection in Gitleaks Prior to 8.30.1

Vulnerability report for CVE-2026-63728, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-21

Last updated on: 2026-07-21

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-21
Last Modified
2026-07-21
Generated
2026-07-21
AI Q&A
2026-07-21
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
github gitleaks to 8.30.1 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1336 The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in Gitleaks prior to version 8.30.1 allows attackers to inject malicious templates that exploit non-hermetic Sprig template functions. Attackers can use functions like env, expandenv, and getHostByName to read arbitrary environment variables and exfiltrate sensitive data such as credentials, tokens, and API keys via DNS queries.

Detection Guidance

Check if Gitleaks is installed and verify the version. Run 'gitleaks version' to confirm if it is below 8.30.1. Inspect report templates for use of env, expandenv, or getHostByName functions in template files.

Impact Analysis

If you use Gitleaks versions before 8.30.1, an attacker who can influence report templates could steal secrets from your environment or scan results. This includes credentials, tokens, and API keys, which could lead to unauthorized access to systems or data breaches. The impact is higher if Gitleaks runs in CI/CD pipelines where environment variables may contain sensitive information.

Compliance Impact

This vulnerability could lead to unauthorized exposure of personal or sensitive data, violating GDPR and HIPAA requirements for data protection and confidentiality. Organizations using vulnerable Gitleaks versions risk non-compliance, potential fines, and reputational damage due to data breaches resulting from secret exfiltration.

Mitigation Strategies

Upgrade Gitleaks to version 8.30.1 or later immediately. Remove or restrict access to custom report templates that may use dangerous Sprig functions. Review CI/CD pipelines for unauthorized template modifications.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-63728. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart