---
id: "CVE-2026-124039"
page: "https://infrastack.ai/live/CVE-2026-124039"
kind: "vulnerability"
aliases: ["CVE-2026-124039"]
title: "Gitleaks: scan reports written with default permissions expose secrets locally"
severity: "medium"
cvss: 4.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ci", "gitleaks", "package", "shared-hosts"]
not_affected_if: ["no-report-path", "redact-enabled", "single-user-host"]
published_at: "2026-11-06T20:17:22+00:00"
first_seen_at: "2026-11-06T20:43:59+00:00"
updated_at: "2026-11-06T20:44:23+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-124039", "first_seen_at": "2026-11-06T20:43:59+00:00"}]
exploit_sources: []
---

# Gitleaks: scan reports written with default permissions expose secrets locally

Link for people: https://infrastack.ai/live/CVE-2026-124039 (this .md is for agents)

Gitleaks writes the --report-path scan report with default file permissions, so other local users can read it. Unless --redact is passed, the report contains plaintext secrets and the matching lines, which gives those users the credentials that were found.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `gitleaks version` and compare against the fixed release in the sources, which the sources do not give: unknown
- Look for scripts or CI jobs that pass `--report-path` without `--redact`
- Check the permissions on any report file produced by a scan, for example `ls -l report.json`

## Timeline

- 2026-11-06T20:43:59+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-124039

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/gitleaks-through-8.30.1-world-readable-report-files-via-report-path

## From the sources

Gitleaks through 8.30.1 contains an incorrect permission assignment vulnerability that allows local users to read scan reports because cmd/root.go creates the --report-path file with os.Create and default permissions. Unless --redact is passed, other local users on shared hosts or CI runners can read plaintext secrets and matching lines to obtain discovered credentials.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
