Vulnerabilities in pkg:golang/github.com/harness/gitness
PACKAGECVE-2025-58158 is a HIGH (CVSS 8.8) harness allows arbitrary file write vulnerability (CWE-73: External Control of File Name or Path) affecting Github.com/harness/gitness libraries in the Go ecosystem. The issue involves harness allows arbitrary file write in gitness lfs server. Remediation is available by upgrading affected packages to version 3.3.0, 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13.
pkg:golang/github.com/harness/gitness
Vulnerability advisories affecting package pkg:golang/github.com/harness/gitness. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-w469-hj2f-jpr5 | CVE-2025-58158 | HIGH | Harness Allows Arbitrary File Write in Gitness LFS server |
CVE-2025-58158 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-58158
To remediate this vulnerability, upgrade all affected Github.com/harness/gitness dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/harness/gitness to 3.3.0
Upgrade github.com/harness/gitness to 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/harness/gitness
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-58158, inspect your project dependencies for Github.com/harness/gitness:
inspect dependencies for github.com/harness/gitness
Analyze the terminal output to locate any version of Github.com/harness/gitness in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In Github.com/harness/gitness, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-58158 Affected Github.com/harness/gitness Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/harness/gitness
|
Go |
≥ 1.0.4
< 3.3.0
|
3.3.0
|
|
github.com/harness/gitness
|
Go |
< 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13
|
1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13
|
References
Frequently Asked Questions
What is CVE-2025-58158?
Which Github.com/harness/gitness versions are affected?
What version fixes CVE-2025-58158?
Is github.com/harness/gitness affected?
What is the CVSS score of CVE-2025-58158?
What CWE is associated with CVE-2025-58158?
How can I check Go dependencies for CVE-2025-58158?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w469-hj2f-jpr5",
"modified" : "2025-08-29T21:09:11Z",
"published" : "2025-08-29T16:41:57Z",
"aliases" : [ "CVE-2025-58158" ],
"summary" : "Harness Allows Arbitrary File Write in Gitness LFS server",
"details" : "### Impact\nOpen 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. \n\nUsers using git LFS are vulnerable.\n\n### Patches\nUsers have to upgrade to v3.3.0 . All previous versions are affected by this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/harness/gitness"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.4"
}, {
"fixed" : "3.3.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/harness/gitness"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/harness/harness/security/advisories/GHSA-w469-hj2f-jpr5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-58158"
}, {
"type" : "WEB",
"url" : "https://github.com/harness/harness/commit/21c5ce42ae13740b1cad47706c2ec85e72cc8c20"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/harness/harness"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-73" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-29T16:41:57Z",
"nvd_published_at" : "2025-08-29T18:15:42Z"
}
}