Summary
The patch deployed against CVE-2025-62156 is ineffective against malicious archives containing symbolic links.
Details
The untar code that handles symbolic links in archives is unsafe. Concretely, the computation of the link's target and the subsequent check are flawed:
|
linkTarget := filepath.Join(filepath.Dir(target), header.Linkname) |
|
if !strings.HasPrefix(filepath.Clean(linkTarget), filepath.Clean(dest)+string(os.PathSeparator)) { |
|
return fmt.Errorf("illegal symlink target: %s -> %s", header.Name, header.Linkname) |
|
} |
PoC
- Create a malicious archive containing two files: a symbolik link with path "./work/foo" and target "/etc", and a normal text file with path "./work/foo/hostname".
- Deploy a workflow like the one in GHSA-p84v-gxvw-73pf with the malicious archive mounted at /work/tmp.
- Submit the workflow and wait for its execution.
- Connect to the corresponding pod and observe that the file "/etc/hostname" was altered by the untar operation performed on the malicious archive. The attacker can hence alter arbitrary files in this way.
Impact
The attacker can overwrite the file /var/run/argo/argoexec with a script of their choice, which will be executed at the pod's start.
Summary
The patch deployed against CVE-2025-62156 is ineffective against malicious archives containing symbolic links.
Details
The untar code that handles symbolic links in archives is unsafe. Concretely, the computation of the link's target and the subsequent check are flawed:
argo-workflows/workflow/executor/executor.go
Lines 1034 to 1037 in 5291e0b
PoC
Impact
The attacker can overwrite the file /var/run/argo/argoexec with a script of their choice, which will be executed at the pod's start.