Skip to content
GHSA Vm9v P987 Xm32

GHSA Vm9v P987 Xm32

github.com • November 27, 2026

A critical path traversal vulnerability exists in the artifact materialization process of Argo Workflows when handling directory artifacts stored in cloud object storage (S3, GCS, Azure Blob). The vulnerability occurs when a malicious object key contains directory traversal components (e.g., ../ ). Since the argoexec artifact drivers do not securely validate or sanitize the cloud-provided object keys, this allows an attacker to escape the designated executor workspace. An attacker with write access to the referenced external S3 bucket (or capable of setting a malicious bucket) can leverage this flaw to perform arbitrary file overwrites inside the workflow execution environment. This can lead to arbitrary remote code execution (RCE) and privilege escalation inside the Pod.

The GetDirectory and DownloadDirectory functions in Argo Workflows artifact drivers (such as S3, Azure Blob, and GCS) fetch all objects under a specific bucket prefix and write them to a local workspace path inside the executor pod.

In the vulnerable implementation (e.g., in workflow/artifacts/s3/s3.go ), the drivers compute the local destination path by using strings.TrimPrefix to remove the directory prefix and then directly append the remaining key to the target download directory using filepath.Join() .

Because filepath.Join resolves ../ sequences across the combined path rather than restricting them to the base directory, a maliciously crafted external object key can escape the designated workspace. This results in an arbitrary file write when the object is subsequently downloaded. The vulnerability mirrors the classic "Zip Slip" pattern, but exploits the unvalidated path components natively provided by Cloud Storage APIs instead of a compression archive.

A workflow utilizes an input artifact defined as a directory ( S3 , GCS , Azure , etc.).

The attacker has write access to the referenced cloud object storage bucket, or they provide a malicious artifact source.

Download the PoC exploit script from: poc_exploit.py

Download the control normal behavior script from: control-normal_behavior.py

Set up the target environment and start the exploit HTTP server to perform a path traversal overwrite: python3 poc_exploit.py

Run the control experiment script to observe the normal behavior being blocked from path traversal: python3 control-normal_behavior.py

Fixed in v4.1.4 and v4.0.12. The S3, GCS, Azure and OSS drivers now derive every local path through a shared containment check: the object key, relative to the listed prefix, must resolve inside the download destination, its nearest existing ancestor must not resolve outside the destination through a symlink, and the final path must not already be a symlink. A key that fails any check aborts the download with illegal object key . The S3 driver also trims the same normalized prefix it lists under, which previously differed when the configured key had no trailing slash.

v3 is not being patched. Users on v3 should upgrade.

Do not consume directory artifacts from buckets or prefixes that untrusted parties can write to. In shared-bucket deployments, note that any workflow author may choose arbitrary output keys.

This is an Arbitrary File Write vulnerability leading to Remote Code Execution (RCE) and potential privilege escalation within the context of the Argo wait or init executor container. An attacker who compromises a shared data bucket or is allowed to provide a customized input artifact endpoint can overwrite arbitrary executor binaries, Kubernetes configurations, or dump sensitive service accounts running on the node.

Package name : argo-workflows

Affected versions : v4.1.0 to v4.1.3, v4.0.0 to v4.0.11, and all v3 releases

Patched versions : v4.1.4, v4.0.12

Vector string : CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (8.8). Scope is unchanged: the write lands inside the workflow pod that consumed the artifact.

CWE : CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')