GHSA-fxhp-mv3v-67qp: `oras-go` tar extraction: Hardlink entry with relative Linkname escapes extract dir via process CWD resolution
A vulnerability in the oras-go tar extraction helper allows a hardlink entry with a relative Linkname to escape the intended extraction directory by exploiting how the process current working directory (CWD) is used during hardlink creation. The validation logic incorrectly returns the original relative target path instead of the resolved absolute path, causing the hardlink to point outside the extraction directory relative to the process CWD. This enables an attacker controlling an OCI registry to create a hardlink inside the extraction directory that links to an arbitrary file in the invoker's CWD, effectively allowing arbitrary file read access.
AI Analysis
Technical Summary
The vulnerability exists in the oras-go library's tar extraction code, specifically in the ensureLinkPath function that validates hardlink targets. While it validates that the resolved absolute path of a hardlink target is inside the extraction base directory, it returns the original relative target path to the caller. The caller then uses os.Link to create the hardlink, which resolves the relative oldname argument against the process's current working directory (CWD), not the extraction directory. An attacker can craft a tarball with a relative hardlink target that passes validation but causes the hardlink to point to a file outside the extraction directory relative to the CWD. This results in a hardlink inside the extraction directory sharing an inode with a file in the CWD, allowing reading or writing to the CWD file via the extracted hardlink. The issue affects oras-go versions up to and including 2.6.1. No official patch or remediation information is provided in the advisory.
Potential Impact
This vulnerability allows an attacker who controls an OCI-compliant registry or artifact source to cause the victim's oras-go client to create hardlinks inside the extraction directory that point to arbitrary files in the victim's current working directory. This effectively provides an arbitrary file read primitive on files in the CWD, potentially exposing sensitive data. The attacker cannot escalate privileges or cause denial of service directly but can read files that the victim process has access to and that exist in the CWD at extraction time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid pulling and auto-extracting OCI artifacts from untrusted sources using oras-go versions up to 2.6.1. Consider running extraction in a controlled environment where the process CWD is isolated or does not contain sensitive files. Monitor vendor channels for an official fix or update.
GHSA-fxhp-mv3v-67qp: `oras-go` tar extraction: Hardlink entry with relative Linkname escapes extract dir via process CWD resolution
Description
A vulnerability in the oras-go tar extraction helper allows a hardlink entry with a relative Linkname to escape the intended extraction directory by exploiting how the process current working directory (CWD) is used during hardlink creation. The validation logic incorrectly returns the original relative target path instead of the resolved absolute path, causing the hardlink to point outside the extraction directory relative to the process CWD. This enables an attacker controlling an OCI registry to create a hardlink inside the extraction directory that links to an arbitrary file in the invoker's CWD, effectively allowing arbitrary file read access.
CVSS v3.1
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 vulnerability exists in the oras-go library's tar extraction code, specifically in the ensureLinkPath function that validates hardlink targets. While it validates that the resolved absolute path of a hardlink target is inside the extraction base directory, it returns the original relative target path to the caller. The caller then uses os.Link to create the hardlink, which resolves the relative oldname argument against the process's current working directory (CWD), not the extraction directory. An attacker can craft a tarball with a relative hardlink target that passes validation but causes the hardlink to point to a file outside the extraction directory relative to the CWD. This results in a hardlink inside the extraction directory sharing an inode with a file in the CWD, allowing reading or writing to the CWD file via the extracted hardlink. The issue affects oras-go versions up to and including 2.6.1. No official patch or remediation information is provided in the advisory.
Potential Impact
This vulnerability allows an attacker who controls an OCI-compliant registry or artifact source to cause the victim's oras-go client to create hardlinks inside the extraction directory that point to arbitrary files in the victim's current working directory. This effectively provides an arbitrary file read primitive on files in the CWD, potentially exposing sensitive data. The attacker cannot escalate privileges or cause denial of service directly but can read files that the victim process has access to and that exist in the CWD at extraction time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid pulling and auto-extracting OCI artifacts from untrusted sources using oras-go versions up to 2.6.1. Consider running extraction in a controlled environment where the process CWD is isolated or does not contain sensitive files. Monitor vendor channels for an official fix or update.
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
Threat ID: 6a45998227e9c797194186f5
Added to database: 07/01/2026, 22:49:38 UTC
Last enriched: 07/01/2026, 22:50:25 UTC
Last updated: 07/02/2026, 00:55:31 UTC
Views: 4
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.