# CVE-2025-0377: HashiCorp go-slug Vulnerable to Zip Slip Attack

> Attackers can exploit a zip-slip vulnerability in the go-slug library to write files to arbitrary locations via crafted tar entries.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Jan 2025
- **Updated:** 12 Feb 2025
- **Also known as:** GHSA-wpfp-cm49-9m9q, GO-2025-3413, ROOT-APP-GOBINARY-CVE-2025-0377, openSUSE-SU-2025:14684-1

## What is CVE-2025-0377?

CVE-2025-0377 is a high-severity path traversal vulnerability in HashiCorp Shared library, published on 21 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

HashiCorp’s go-slug library is vulnerable to a zip-slip style attack when a non-existing user-provided path is extracted from the tar entry.

Weakness: CWE-59 (Improper Link Resolution Before File Access)

## Which versions are affected by CVE-2025-0377?

3 open source packages ship an affected version, including github.com/hashicorp/go-slug. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/hashicorp/go-slug` | Go | All versions | 0.16.3 |
| `github.com/hashicorp/go-slug` | Go | All versions | 0.16.3 |
| `github.com/hashicorp/go-slug` | Go | All versions | 0.16.3 |
| `helmfile` | openSUSE:Tumbleweed | All versions | 0.170.1-1.1 |

Products: Hashicorp Go-Slug.

## How do I fix CVE-2025-0377?

Upgrade github.com/hashicorp/go-slug to 0.16.3 or later.

## Is CVE-2025-0377 being exploited?

There is no known exploitation of CVE-2025-0377 in the wild and no public exploit code.

## Other vulnerabilities in HashiCorp Shared library

- [CVE-2020-29529](https://insights.sbomify.com/CVE-2020-29529/): Unsafe tar unpacking in HashiCorp go-slug (high 7.5)
- [CVE-2026-14978](https://insights.sbomify.com/CVE-2026-14978/): Unicode normalization mismatch in go-slug ignore pattern matching may bypass intended file exclusions (medium 5.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-0377 and fix it if it is affected.

What it is: CVE-2025-0377 is a high-severity path traversal vulnerability in HashiCorp Shared library, published on 21 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-0377 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/hashicorp/go-slug (Go): affected all versions; fixed in 0.16.3
- github.com/hashicorp/go-slug (Go): affected all versions; fixed in 0.16.3
- github.com/hashicorp/go-slug (Go): affected all versions; fixed in 0.16.3

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-0377/ (Markdown: https://insights.sbomify.com/CVE-2025-0377/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-0377
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-0377
- OSV: https://osv.dev/vulnerability/CVE-2025-0377

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-0377/
Summaries are generated and may contain mistakes; the official description above is the record.
