GHSA-VM9V-P987-XM32
Argo Workflows Cloud Artifact Slip (Path Traversal Variant)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-VM9V-P987-XM32 divulgada · CVSS 8.8 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Remediación | Parche v4.0.12 | github.com/argoproj/argo-workflows/v4 · 0 d desde divulgación | |
| Remediación | Parche v4.1.4 | github.com/argoproj/argo-workflows/v4 · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Advisory Details
Title: Argo Workflows Cloud Artifact Slip (Path Traversal Variant)
Description:
Summary
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.
Details
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()`.
// From workflow/artifacts/s3/s3.go
for _, objKey := range keys {
relKeyPath := strings.TrimPrefix(objKey, keyPrefix)
localPath := filepath.Join(path, relKeyPath)
// ... file is subsequently written to localPath
}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.
PoC
Prerequisites
- 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.
Reproduction Steps
- Download the PoC exploit script from: poc_exploit.py
https://gist.github.com/secret_gist_url_poc_exploit - Download the control normal behavior script from: control-normal_behavior.py
https://gist.github.com/secret_gist_url_control_normal_behavior - Set up the target environment and start the exploit HTTP server to perform a path traversal overwrite:
- Run the control experiment script to observe the normal behavior being blocked from path traversal:
Log of Evidence
[SUCCESS] Exploit worked! Found pwned.txt with content.Patches
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.
Workarounds
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.
Impact
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.
Affected products
- Ecosystem: go
- 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
Severity
- Severity: High
- 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.
Weaknesses
- CWE: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Occurrences
| Permalink | Description |
| :--- | :--- |
| https://github.com/argoproj/argo-workflows/blob/main/workflow/artifacts/s3/s3.go#L667-L668 https://github.com/argoproj/argo-workflows/blob/main/workflow/artifacts/s3/s3.go#L667-L668 | The vulnerable S3 artifact driver code that trims the prefix and joins it unsafely to the local path. |
| https://github.com/argoproj/argo-workflows/blob/main/workflow/artifacts/azure/azure.go#L218-L219 https://github.com/argoproj/argo-workflows/blob/main/workflow/artifacts/azure/azure.go#L218-L219 | The vulnerable Azure artifact driver code that processes blob objects with unsafe relative paths. |
| https://github.com/argoproj/argo-workflows/blob/main/workflow/artifacts/gcs/gcs.go#L153-L154 https://github.com/argoproj/argo-workflows/blob/main/workflow/artifacts/gcs/gcs.go#L153-L154 | The vulnerable GCS artifact driver code that uses `TrimPrefix` resulting in path traversal during directory download. |
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/argoproj/argo-workflows/v4 |
Corregida | v4.0.12, v4.1.4 | 0 d · 0 d | v4.1.6 no afectada |
gogithub.com/argoproj/argo-workflows/v3 |
Sin parche | — | — | v3.7.18 afectada |
4.0.12v4.0.124.1.4v4.1.4Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/argoproj/argo-workflows/security/advisories/GHSA-vm9v-p987-xm32Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
