Intel

AIKIDO-2026-10420

github.com/google/go-containerregistry is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Mar 27, 2026

60

Medium Risk

This Affects:

GOgithub.com/google/go-containerregistry
0.0.1 - 0.21.2
Fixed in 0.21.3
Are you affected? Scan for Free

TL;DR

Affected versions of this package allow mutate.Extract() to pass untrusted tar entry names and link targets without ensuring they remain within the intended extraction root, enabling path traversal, symlink escape, and absolute path injection during image export or flatten operations. An attacker could craft a malicious container image so that, when a victim extracts its contents, files are written outside the target directory or links are created to arbitrary host paths, potentially overwriting sensitive files or planting attacker-controlled content in fixed system locations.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

github.com/google/go-containerregistry is vulnerable to Path Traversal in versions 0.0.1 - 0.21.2.

How to fix this

Upgrade the github.com/google/go-containerregistry library to the patch version.