{"id":"CVE-2026-35454","aliases":["CVE-2026-35454","GHSA-8x9r-hvwg-c55h","GO-2026-5270"],"related":[],"kind":"vulnerability","state":"published","title":"Code Extension Marketplace has a Zip Slip Path Traversal","summary":"The Code Extension Marketplace is an open-source alternative to the VS Code Marketplace. Prior to 2.4.2, Zip Slip vulnerability in coder/code-marketplace allowed a malicious VSIX file to write arbitrary files outside the extension directory. ExtractZip passed raw zip entry names to a callback that wrote files via filepath.Join with no boundary check; filepath.Join resolved .. components but did not prevent the result from escaping the base path. This vulnerability is fixed in 2.4.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The Code Extension Marketplace is an open-source alternative to the VS Code Marketplace. Prior to 2.4.2, Zip Slip vulnerability in coder/code-marketplace allowed a malicious VSIX file to write arbitrary files outside the extension directory. ExtractZip passed raw zip entry names to a callback that wrote files via filepath.Join with no boundary check; filepath.Join resolved .. components but did not prevent the result from escaping the base path. This vulnerability is fixed in 2.4.2.","source":"cvelist"},{"lang":"en","text":"# Zip Slip Path Traversal in coder/code-marketplace\n\n## Summary\n\nA Zip Slip (CWE-22) vulnerability in `coder/code-marketplace` ≤ v2.4.1 allowed a malicious VSIX file to write arbitrary files outside the extension directory. `ExtractZip` passed raw zip entry names to a callback that wrote files via `filepath.Join` with no boundary check; `filepath.Join` resolved `..` components but did not prevent the result from escaping the base path.\n\n\n## Root Cause\n\n`ExtractZip` passed the raw, attacker-controlled `zf.Name` to a caller-supplied callback:\n\n```go\nreturn false, fn(zf.Name, zr)  // zf.Name not sanitized\n```\n\n`AddExtension` constructed the output path with `filepath.Join` and no boundary check:\n\n```go\npath := filepath.Join(dir, name)              // zip loop\npath := filepath.Join(dir, file.RelativePath) // extra files loop\n```\n\n`filepath.Clean` resolved `..` lexically but did not confine the result to `dir`:\n\n```\nfilepath.Join(\"/srv/ext/pub/1.0\", \"../../../../etc/cron.d/evil\")\n  → \"/etc/cron.d/evil\"\n```\n\n## Attack Scenario\n\nAn authenticated user (any upload-capable role) would submit a VSIX containing path-traversal entries.\n\nOn extraction, files would land at attacker-chosen paths writable by the marketplace process, enabling persistence (cron/init injection), SSH key injection, `ld.so.preload` hijacking, or binary overwrite depending on process privileges.\n\n## Fix\n\nAddressed in https://github.com/coder/code-marketplace/releases/tag/v2.4.2\n\n## Recognition\nCoder would like to thank [Kandlaguduru Vamsi](https://www.linkedin.com/in/vamsi-k-5419632a9/) for responsibly disclosing this issue in accordance with https://coder.com/security/policy","format":"markdown","source":"ghsa"},{"lang":"en","text":"Code Extension Marketplace: Zip Slip Path Traversal in github.com/coder/code-marketplace","format":"markdown","source":"go"},{"lang":"es","text":"El Code Extension Marketplace es una alternativa de código abierto al VS Code Marketplace. Antes de la versión 2.4.2, una vulnerabilidad Zip Slip en coder/code-marketplace permitía que un archivo VSIX malicioso escribiera archivos arbitrarios fuera del directorio de la extensión. ExtractZip pasaba nombres de entrada zip sin procesar a una función de devolución de llamada que escribía archivos a través de filepath.Join sin una comprobación de límites; filepath.Join resolvía componentes '..' pero no evitaba que el resultado escapara de la ruta base. Esta vulnerabilidad está corregida en la versión 2.4.2.","source":"nvd"}],"published":"2026-04-04T06:26:02.000Z","modified":"2026-07-24T21:10:00.143Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 2.4.2","status":"affected"}],"vendor":"coder","product":"code-marketplace","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.2.3-0.20260402184705-988440dee05f"}],"ecosystem":"Go","package":"github.com/coder/code-marketplace","purl":"pkg:golang/github.com/coder/code-marketplace","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.2.3-0.20260402184705-988440dee05f"}],"ecosystem":"Go","package":"github.com/coder/code-marketplace","purl":"pkg:golang/github.com/coder/code-marketplace","source":"go"},{"ranges":[{"status":"affected","lastAffected":"2.4.1"}],"vendor":"coder","product":"code-marketplace","cpe":"cpe:2.3:a:coder:code-marketplace:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/coder/code-marketplace/security/advisories/GHSA-8x9r-hvwg-c55h","tags":["advisory","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/coder/code-marketplace/releases/tag/v2.4.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35454","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/coder/code-marketplace/commit/988440dee05fceef8400ed725badc604dbf90792","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/coder/code-marketplace","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-04-07T14:35:14.881Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-35454","url":"https://www.cve.org/CVERecord?id=CVE-2026-35454","licence":"CVE Terms of Use","modified":"2026-04-07T15:08:45.865Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8x9r-hvwg-c55h","url":"https://github.com/advisories/GHSA-8x9r-hvwg-c55h","licence":"CC-BY-4.0","modified":"2026-06-25T19:56:08.232Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5270","url":"https://pkg.go.dev/vuln/GO-2026-5270","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:23.135Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-35454","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35454","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"}],"updatedAt":"2026-11-25T22:59:18.075Z","epss":{"score":0.00357,"percentile":0.31481,"date":"2026-12-01T12:00:22.000Z"}}