{"answers":{"affected":"5 open source packages ship an affected version, including github.com/harness/gitness.","exploited":"There is no known exploitation of CVE-2025-58158 in the wild and no public exploit code.","fix":"Upgrade github.com/harness/gitness to a fixed version for your release line: 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13 or 3.3.0.","what":"CVE-2025-58158 is a high-severity path traversal vulnerability in harness, published on 29 Aug 2025. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-58158 and fix it if it is affected.\n\nWhat it is: CVE-2025-58158 is a high-severity path traversal vulnerability in harness, published on 29 Aug 2025. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-58158 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/harness/gitness (Go): affected all versions; fixed in 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13\n- github.com/harness/gitness (Go): affected all versions; fixed in 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13\n- github.com/harness/gitness (Go): affected all versions; fixed in 1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13\n- github.com/harness/gitness (Go): affected from 1.0.4; fixed in 3.3.0\n- github.com/harness/gitness (Go): affected from 1.0.4; fixed in 3.3.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-58158/ (Markdown: https://insights.sbomify.com/CVE-2025-58158/index.md)","id":"CVE-2025-58158","markdown":"https://insights.sbomify.com/CVE-2025-58158/index.md","name":"CVE-2025-58158","record":{"aliases":["GHSA-w469-hj2f-jpr5","GO-2025-3926"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Harness Gitness LFS","requires_auth":"low_privilege","summary":"Authenticated attackers can write arbitrary files to the server via the Git LFS upload API due to improper path sanitization, potentially compromising the system.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-73","name":"External Control of File Name or Path"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Harness Affected by Arbitrary File Write in Gitness LFS server","id":"CVE-2025-58158","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":5,"n_references":2,"next":{"headline":"WeGIA Authenticated Arbitrary File Upload Leading To Remote Code Execution (RCE)","id":"CVE-2025-58159"},"packages":[{"ecosystem":"Go","fixed":["1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13"],"introduced":["0"],"last_affected":[],"package":"github.com/harness/gitness","purl":null,"source":"GHSA-w469-hj2f-jpr5"},{"ecosystem":"Go","fixed":["1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13"],"introduced":["0"],"last_affected":[],"package":"github.com/harness/gitness","purl":"pkg:golang/github.com/harness/gitness","source":"GHSA-w469-hj2f-jpr5"},{"ecosystem":"Go","fixed":["1.0.4-gitspaces-beta.0.20250808064055-21c5ce42ae13"],"introduced":["0"],"last_affected":[],"package":"github.com/harness/gitness","purl":"pkg:golang/github.com/harness/gitness","source":"GO-2025-3926"},{"ecosystem":"Go","fixed":["3.3.0"],"introduced":["1.0.4"],"last_affected":[],"package":"github.com/harness/gitness","purl":null,"source":"GHSA-w469-hj2f-jpr5"},{"ecosystem":"Go","fixed":["3.3.0"],"introduced":["1.0.4"],"last_affected":[],"package":"github.com/harness/gitness","purl":"pkg:golang/github.com/harness/gitness","source":"GHSA-w469-hj2f-jpr5"}],"prev":{"headline":"gnark affected by denial of service when computing scalar multiplication using fake-GLV algorithm","id":"CVE-2025-58157"},"products":["harness"],"published":"2025-08-29","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-08-29","vendors":["harness"]},"summary":"Authenticated attackers can write arbitrary files to the server via the Git LFS upload API due to improper path sanitization, potentially compromising the system.","url":"https://insights.sbomify.com/CVE-2025-58158/"}