Intel

AIKIDO-2026-442764

github.com/hashicorp/go-getter/v2 is vulnerable to Path Traversal

CVE-2026-19585Published Oct 29, 2026
October 29, 2026

53

CVE Score

Medium

Path Traversal

Are you affected? Scan for Free

TL;DR

The Get() method of the S3 and GCS getters in go-getter/v2 lists bucket objects matching a Prefix query, computes each object's destination path with filepath.Rel() relative to the requested prefix, and joins that relative path onto the caller's destination directory with filepath.Join() before writing the downloaded object there. Because object keys returned by the storage backend are not validated before this join, a key whose relative path contains ".." segments lets the write escape the intended destination directory during a directory download. The default configuration supplies the destination directory from the getter.Request.Dst field set by the caller invoking a directory-mode S3 or GCS download. The fix adds a containsDotDot() check on the computed relative object path in both s3/get_s3.go and gcs/get_gcs.go, returning an error instead of joining and downloading when the key contains a traversal segment.

How do I fix this?

Upgrade the github.com/hashicorp/go-getter/v2 package to version 2.2.5 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and perform directory-mode downloads from S3 or GCS buckets with the go-getter/v2 S3 or GCS getters.

Versions

2.0.0 - 2.2.4

Fixed in 2.2.5

Background info

github.com/hashicorp/go-getter/v2 is vulnerable to Path Traversal in versions 2.0.0 - 2.2.4.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea