
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-58158 is an arbitrary file write vulnerability in the Harness Open Source (Gitness) git LFS server, caused by improper sanitization of the upload path in the LFS file upload API. An authenticated attacker with low-privilege access can craft a malicious upload request to write arbitrary files to any location on the server's file system, potentially compromising the entire server. All versions prior to 3.3.0 are affected. The vulnerability was disclosed on August 29, 2025, and carries a CVSS v3.1 base score of 8.8 (High) (GitHub Advisory, ENISA EUVD).
The root cause is improper input validation and path sanitization (CWE-22: Path Traversal; CWE-73: External Control of File Name or Path) in the LFS file upload API endpoint of the Gitness server. The upload handler failed to validate that the Object ID (OID) used to construct the storage path was a legitimate SHA-256 hash, allowing a crafted OID containing path traversal sequences (e.g., ../) to resolve to arbitrary file system locations outside the intended LFS object store. The fix, introduced in commit 21c5ce4, adds SHA-256 hash verification of uploaded content against the provided OID, checks for pre-existing objects to prevent overwrites, and rejects requests where the computed hash does not match the declared OID (GitHub Commit, GitHub Advisory). Exploitation requires only a valid authenticated session with API access — no elevated privileges are needed (ENISA EUVD).
Successful exploitation allows an authenticated attacker to write arbitrary files to any location on the server's file system, enabling a wide range of follow-on attacks including remote code execution (e.g., by overwriting configuration files, cron jobs, or SSH authorized keys), privilege escalation, and full server compromise. Confidentiality, integrity, and availability are all rated High, as an attacker could exfiltrate sensitive data, corrupt or replace critical files, and render the server inoperable. All organizations using Harness Open Source (Gitness) with git LFS enabled on versions prior to 3.3.0 are at risk (GitHub Advisory, ENISA EUVD).
As of the time of disclosure, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (ENISA EUVD). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.042%, indicating a currently low probability of exploitation in the near term. The vulnerability was detected by Qualys scanners and reported by security researcher TheKavorka (GitHub Advisory). Exploitation requires authenticated access to the Gitness API, which limits the attack surface to users or compromised accounts with existing access.
sha256:../../etc/cron.d/backdoor or similar) instead of a legitimate SHA-256 hash. Set the request body to the desired malicious file content./etc/cron.d/, SSH authorized_keys, or web shell locations), execute code, or exfiltrate sensitive data (GitHub Advisory, GitHub Commit).../, %2e%2e%2f, or non-standard SHA-256 formatted strings) in request parameters or headers./etc/, /var/spool/cron/, home directories, or web-accessible paths); new SSH authorized_keys entries; unexpected cron job files.Harness has released version 3.3.0 of Harness Open Source (Gitness), which patches this vulnerability by enforcing SHA-256 hash validation of uploaded LFS content against the provided OID and rejecting requests with mismatched or malformed OIDs (GitHub Advisory, GitHub Commit). All users running versions prior to 3.3.0 should upgrade immediately. As interim mitigations, administrators should restrict API access to trusted users only, implement network-level controls to limit exposure of the Gitness API, monitor for unauthorized file write attempts, and audit existing systems for signs of compromise (ENISA EUVD).
The vulnerability was covered by SecurityOnline.info shortly after disclosure, highlighting the arbitrary file write risk in the Gitness LFS server (SecurityOnline). A community vulnerability analysis report was published on September 2, 2025, by researcher CyberDudeBivash (CyberDudeBivash Blog). The vulnerability was also included in the CISA weekly vulnerability summary bulletin for the week of August 25, 2025 (CISA Bulletin). No major vendor statements beyond the GitHub security advisory have been issued.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."