{"id":"CVE-2026-124039","kind":"vulnerability","aliases":["CVE-2026-124039"],"related":[],"title":"Gitleaks: scan reports written with default permissions expose secrets locally","description":"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.","summary":"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.","severity":"medium","cvss":4.8,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["ci","gitleaks","package","shared-hosts"],"not_affected_if":["no-report-path","redact-enabled","single-user-host"],"how_to_check":"- Run `gitleaks version` and compare against the fixed release in the sources, which the sources do not give: unknown\n- Look for scripts or CI jobs that pass `--report-path` without `--redact`\n- Check the permissions on any report file produced by a scan, for example `ls -l report.json`","fix":null,"status":"open","published_at":"2026-11-06T20:17:22+00:00","first_seen_at":"2026-11-06T20:43:59+00:00","triaged_at":"2026-11-06T20:44:23+00:00","updated_at":"2026-11-06T20:44:23+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-06T20:44:23Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"local","title":"Gitleaks: scan reports written with default permissions expose secrets locally","impact":"medium","summary":"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.","audience":"developers","category":"package","nicknames":[],"who_cares":["gitleaks","ci","shared-hosts"],"confidence":0.7,"fix_status":"unknown","needs_auth":"yes","worst_case":"local users read plaintext secrets from scan reports","analyst_note":"Confirm the fixed version and whether a patch exists; the sources only give the affected range through 8.30.1 and a VulnCheck advisory.","how_to_check":"- Run `gitleaks version` and compare against the fixed release in the sources, which the sources do not give: unknown\n- Look for scripts or CI jobs that pass `--report-path` without `--redact`\n- Check the permissions on any report file produced by a scan, for example `ls -l report.json`","plain_action":"","needs_analyst":true,"not_affected_if":["redact-enabled","single-user-host","no-report-path"],"who_is_affected":"Anyone who runs Gitleaks through 8.30.1 with --report-path on a shared host or CI runner where other local users can access the output directory. Runs that pass --redact keep secret values out of the report. Remote-only use of Gitleaks, or machines where only the scanning user has access, are less exposed.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000713,"input_tokens":4266,"output_tokens":573,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-124039':13A,16A '-2026':12A,15A '8.30.1':66C 'allow':74C 'assign':71C 'ci':17B,105C 'cmd/root.go':82C 'contain':48B,67C 'creat':83C 'credenti':60B,117C 'cve':11A,14A 'default':6A,32B,92C 'discov':116C 'expos':8A 'file':33B,88C 'found':63B 'gitleak':1A,18B,23B,64C 'give':56B 'host':22B,103C 'incorrect':69C 'line':54B,113C 'local':10A,37B,75C,99C 'match':53B,112C 'obtain':115C 'os.create':90C 'packag':19B 'pass':45B,97C 'path':28B,87C 'permiss':7A,34B,70C,93C 'plaintext':49B,109C 'read':40B,78C,108C 'redact':43B,95C 'report':3A,27B,30B,47B,80C,86C 'report-path':26B,85C 'runner':106C 'scan':2A,29B,79C 'secret':9A,50B,110C 'share':21B,102C 'shared-host':20B 'unless':42B,94C 'user':38B,58B,76C,100C 'vulner':72C 'write':24B 'written':4A","nicknames":[],"mitigations":[],"who_affected":"Anyone who runs Gitleaks through 8.30.1 with --report-path on a shared host or CI runner where other local users can access the output directory. Runs that pass --redact keep secret values out of the report. Remote-only use of Gitleaks, or machines where only the scanning user has access, are less exposed.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"unknown","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["ci","gitleaks","medium","package","sharedhosts"],"campaign_type":null,"search_a":"'-124039':13A,16A '-2026':12A,15A 'cve':11A,14A 'default':6A 'expos':8A 'gitleak':1A 'local':10A 'permiss':7A 'report':3A 'scan':2A 'secret':9A 'written':4A","search_b":"'ci':17B 'contain':48B 'credenti':60B 'default':32B 'file':33B 'found':63B 'gitleak':18B,23B 'give':56B 'host':22B 'line':54B 'local':37B 'match':53B 'packag':19B 'pass':45B 'path':28B 'permiss':34B 'plaintext':49B 'read':40B 'redact':43B 'report':27B,30B,47B 'report-path':26B 'scan':29B 'secret':50B 'share':21B 'shared-host':20B 'unless':42B 'user':38B,58B 'write':24B","search_c":"'8.30.1':66C 'allow':74C 'assign':71C 'ci':105C 'cmd/root.go':82C 'contain':67C 'creat':83C 'credenti':117C 'default':92C 'discov':116C 'file':88C 'gitleak':64C 'host':103C 'incorrect':69C 'line':113C 'local':75C,99C 'match':112C 'obtain':115C 'os.create':90C 'pass':97C 'path':87C 'permiss':70C,93C 'plaintext':109C 'read':78C,108C 'redact':95C 'report':80C,86C 'report-path':85C 'runner':106C 'scan':79C 'secret':110C 'share':102C 'unless':94C 'user':76C,100C 'vulner':72C","first_public_at":"2026-11-06T20:17:22+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/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","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-124039","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-124039","severity":null,"published_at":"2026-11-06T20:17:22+00:00","modified_at":"2026-11-06T20:17:22+00:00","first_seen_at":"2026-11-06T20:43:59+00:00","fetched_at":"2026-11-06T20:43:59+00:00","note":null}],"documents":[{"id":89787,"url":"https://www.vulncheck.com/advisories/gitleaks-through-8.30.1-world-readable-report-files-via-report-path","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}