{"id":"CVE-2026-50163","state":"PUBLISHED","title":"oras-go: Hardlink entry with relative Linkname escapes extract dir via process CWD resolution in `oras-go` tar extraction","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.","publishedAt":"2026-07-17T19:36:01.254Z","updatedAt":"2026-07-20T15:01:16.630Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["oras-project oras-go"],"affected":[{"vendor":"oras-project","product":"oras-go","versions":[{"version":"< 2.6.2","status":"affected"}]}],"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"],"weaknesses":["CWE-22","CWE-59"],"ingestedAt":"2026-10-29T20:12:16.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/50xxx/CVE-2026-50163.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-50163","state":"PUBLISHED","datePublished":"2026-07-17T19:36:01.254Z","dateUpdated":"2026-07-20T15:01:16.630Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-06-03T20:54:20.432Z"},"containers":{"cna":{"title":"oras-go: Hardlink entry with relative Linkname escapes extract dir via process CWD resolution in `oras-go` tar extraction","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"oras-project","product":"oras-go","versions":[{"version":"< 2.6.2","status":"affected"}]}],"references":[{"url":"https://github.com/oras-project/oras-go/security/advisories/GHSA-fxhp-mv3v-67qp","name":"https://github.com/oras-project/oras-go/security/advisories/GHSA-fxhp-mv3v-67qp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/oras-project/oras-go/pull/1232","name":"https://github.com/oras-project/oras-go/pull/1232","tags":["x_refsource_MISC"]},{"url":"https://github.com/oras-project/oras-go/commit/c463c654ab3ef34422c1764cd619806cebf20451","name":"https://github.com/oras-project/oras-go/commit/c463c654ab3ef34422c1764cd619806cebf20451","tags":["x_refsource_MISC"]},{"url":"https://github.com/oras-project/oras-go/releases/tag/v2.6.2","name":"https://github.com/oras-project/oras-go/releases/tag/v2.6.2","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":7.1,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-59","lang":"en","description":"CWE-59: Improper Link Resolution Before File Access ('Link Following')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-07-17T19:36:01.254Z"},"source":{"advisory":"GHSA-fxhp-mv3v-67qp","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/oras-project/oras-go/security/advisories/GHSA-fxhp-mv3v-67qp","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-20T15:00:48.168210Z","id":"CVE-2026-50163","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-20T15:01:16.630Z"}}]}}}