CVE-2026-50163: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in oras-project oras-go
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.
AI Analysis
Technical Summary
The oras-go tar extraction helper has a vulnerability (CVE-2026-50163) where the handling of hardlink entries with relative Linknames is flawed. The validation logic fails to resolve the absolute path of the hardlink target and returns the relative path instead. Because the process current working directory (CWD) is used during hardlink creation, this allows the hardlink to escape the intended extraction directory and point to files outside it. An attacker who controls an OCI registry can exploit this to create hardlinks that link to arbitrary files in the invoker's CWD, leading to unauthorized file read access. This vulnerability affects versions of oras.land/oras-go/v2 up to and including 2.6.1.
Potential Impact
An attacker controlling an OCI registry can craft tar archives with hardlink entries that escape the extraction directory and link to arbitrary files in the process CWD of the victim. This results in unauthorized read access to arbitrary files, potentially exposing sensitive information. The vulnerability does not impact integrity or availability but has a high confidentiality impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid extracting untrusted tar archives using the affected oras-go versions or perform extraction in isolated environments where the current working directory does not contain sensitive files.
CVE-2026-50163: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in oras-project oras-go
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.
CVSS v3.1
Score 7.1high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The oras-go tar extraction helper has a vulnerability (CVE-2026-50163) where the handling of hardlink entries with relative Linknames is flawed. The validation logic fails to resolve the absolute path of the hardlink target and returns the relative path instead. Because the process current working directory (CWD) is used during hardlink creation, this allows the hardlink to escape the intended extraction directory and point to files outside it. An attacker who controls an OCI registry can exploit this to create hardlinks that link to arbitrary files in the invoker's CWD, leading to unauthorized file read access. This vulnerability affects versions of oras.land/oras-go/v2 up to and including 2.6.1.
Potential Impact
An attacker controlling an OCI registry can craft tar archives with hardlink entries that escape the extraction directory and link to arbitrary files in the process CWD of the victim. This results in unauthorized read access to arbitrary files, potentially exposing sensitive information. The vulnerability does not impact integrity or availability but has a high confidentiality impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid extracting untrusted tar archives using the affected oras-go versions or perform extraction in isolated environments where the current working directory does not contain sensitive files.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-fxhp-mv3v-67qp
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-50163"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
- Is Cloud Service
- true
Threat ID: 6a45998227e9c797194186f5
Added to database: 07/01/2026, 22:49:38 UTC
Last enriched: 07/18/2026, 11:18:52 UTC
Last updated: 07/21/2026, 06:54:03 UTC
Views: 143
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.