p PatchFirst

CVE-2026-50163

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

CVSS 7.1 · High · EPSS 0.4% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="golang-oras-oras-go"'

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Fixes in distributions

Stack: system

Affected products and versions

  • oras-go

    Versions
    • < 2.6.2: Affected

    No fix published

  • golang-oras-oras-go Debian 12

    Versions
    • 1.1.1-1
    • 2.5.0-1
    • 2.6.0-1
    • 2.6.2-1
    • 2.6.2-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • golang-oras-oras-go Debian 13

    Versions
    • 2.5.0-1
    • 2.6.0-1
    • 2.6.2-1
    • 2.6.2-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • golang-oras-oras-go Debian 14

    Versions
    • 2.5.0-1
    • 2.6.0-1
    Affected ranges
    • ECOSYSTEM: < 2.6.2-1

    Update to 2.6.2-1

  • golang-oras-oras-go Ubuntu 24.04 LTS

    Versions
    • 1.1.1-1ubuntu1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • golang-oras-oras-go Ubuntu 26.10

    Versions
    • 2.6.0-1
    • 2.6.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • golang-oras-oras-go Ubuntu 26.04 LTS

    Versions
    • 2.5.0-1
    • 2.6.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →