CVE-2026-35454
JSON

8.7high

Code Extension Marketplace has a Zip Slip Path Traversal

Severity
8.7high CVSS:4.0 by GitHub_M
Exploit likelihood
0.36% (higher than 31% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8x9r-hvwg-c55hGO-2026-5270

Description

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.

Affected

Product or packageVersionsReported by
coder code-marketplace< 2.4.2, up to 2.4.1CVE List, NVD
github.com/coder/code-marketplace (Go)before 1.2.3-0.20260402184705-988440dee05fGitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

Zip Slip Path Traversal in coder/code-marketplace

Summary

A 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.

Root Cause

ExtractZip passed the raw, attacker-controlled zf.Name to a caller-supplied callback:

return false, fn(zf.Name, zr)  // zf.Name not sanitized

AddExtension constructed the output path with filepath.Join and no boundary check:

path := filepath.Join(dir, name)              // zip loop
path := filepath.Join(dir, file.RelativePath) // extra files loop

filepath.Clean resolved .. lexically but did not confine the result to dir:

filepath.Join("/srv/ext/pub/1.0", "../../../../etc/cron.d/evil")
  → "/etc/cron.d/evil"

Attack Scenario

An authenticated user (any upload-capable role) would submit a VSIX containing path-traversal entries.

On 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.

Fix

Addressed in https://github.com/coder/code-marketplace/releases/tag/v2.4.2

Recognition

Coder would like to thank Kandlaguduru Vamsi for responsibly disclosing this issue in accordance with https://coder.com/security/policy

Go Vulnerability Database

Code Extension Marketplace: Zip Slip Path Traversal in github.com/coder/code-marketplace

NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-35454 changed 2026-04-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-8x9r-hvwg-c55h changed 2026-06-25CC-BY-4.0
Go Vulnerability DatabaseGO-2026-5270 changed 2026-06-25CC-BY-4.0
NVDCVE-2026-35454 changed 2026-07-24Public domain