CVE-2025-58158
Harness Affected by Arbitrary File Write in Gitness LFS server
Also known as GHSA-w469-hj2f-jpr5, GO-2025-3926
Mitigation
- Upgrade github.com/harness/gitness to one of 3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13 (or later in the same release line).
Who should check
- Projects that depend on Go package github.com/harness/gitness (>= 1.0.4, < 3.3.0)
- Anyone running harness < 3.3.0
Vulnerability facts
- Affected
- github.com/harness/gitness >= 1.0.4, < 3.3.0
- Fixed in
- 3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 8.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.84% chance of exploitation in 30 days (percentile 55, 2026-11-26)
- CWE
- CWE-22, CWE-73
- Modified
Description
Harness Open Source is an end-to-end developer platform with Source Control Management, CI/CD Pipelines, Hosted Developer Environments, and Artifact Registries. Prior to version 3.3.0, Open Source Harness git LFS server (Gitness) exposes api to retrieve and upload files via git LFS. Implementation of upload git LFS file api is vulnerable to arbitrary file write. Due to improper sanitization for upload path, a malicious authenticated user who has access to Harness Gitness server api can use a crafted upload request to write arbitrary file to any location on file system, may even compromise the server. Users using git LFS are vulnerable. This issue has been patched in version 3.3.0.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/harness/gitness | >= 1.0.4, < 3.3.0 | 3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13 | osv |
| harness | < 3.3.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-58158. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-58158.md Affected: github.com/harness/gitness >= 1.0.4, < 3.3.0 Fixed in: 3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13 Steps: 1. Search this machine and project for github.com/harness/gitness (Go), harness: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2025-58158 being exploited?
There is no confirmed exploitation: CVE-2025-58158 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.84% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-58158?
High: CVSS 8.8 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2025-58158?
github.com/harness/gitness >= 1.0.4, < 3.3.0.
Is there a fix for CVE-2025-58158?
Yes. Fixed in 3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13. Upgrade github.com/harness/gitness to one of 3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13 (or later in the same release line).
How do I check if I'm affected by CVE-2025-58158?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.