Vulnerabilities in pkg:golang/github.com/coder/code-marketplace

PACKAGE
Advisory Identifier: GHSA-8x9r-hvwg-c55h
Advisory Summary

CVE-2026-35454 is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Code Extension Marketplace libraries in the Go ecosystem. The issue involves zip slip path traversal. Remediation is available by upgrading affected packages to version 1.2.3-0.20260402184705-988440dee05f.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/coder/code-marketplace

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/coder/code-marketplace. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8x9r-hvwg-c55h CVE-2026-35454 HIGH Code Extension Marketplace: Zip Slip Path Traversal

CVE-2026-35454 at a Glance

CVE Identifier CVE-2026-35454
GHSA Identifier GHSA-8x9r-hvwg-c55h
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Code Extension Marketplace
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-35454

To remediate this vulnerability, upgrade all affected Code Extension Marketplace dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/coder/code-marketplace fixed: 1.2.3-0.20260402184705-988440dee05f
Upgrade github.com/coder/code-marketplace to 1.2.3-0.20260402184705-988440dee05f
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/coder/code-marketplace

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-35454, inspect your project dependencies for Code Extension Marketplace:

inspect dependencies for github.com/coder/code-marketplace

Analyze the terminal output to locate any version of Code Extension Marketplace in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.3-0.20260402184705-988440dee05f), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Code Extension Marketplace, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# 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: ```go return false, fn(zf.Name, zr) // zf.Name not sanitized ``` `AddExtension` constructed the output path with `filepath.Join` and no boundary check: ```go 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](https://www.linkedin.com/in/vamsi-k-5419632a9/) for responsibly disclosing this issue in accordance with https://coder.com/security/policy

CVE-2026-35454 Affected Code Extension Marketplace Versions

1 component(s)
Fixed Versions:
1.2.3-0.20260402184705-988440dee05f
Product / Package Ecosystem Affected Versions Fixed Version
github.com/coder/code-marketplace
Go
< 1.2.3-0.20260402184705-988440dee05f
1.2.3-0.20260402184705-988440dee05f

References

Frequently Asked Questions

What is CVE-2026-35454?
CVE-2026-35454 is a security vulnerability in Code Extension Marketplace involving Zip Slip Path Traversal under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Code Extension Marketplace versions are affected?
Affected versions include releases prior to 1.2.3-0.20260402184705-988440dee05f across affected packages: github.com/coder/code-marketplace.
What version fixes CVE-2026-35454?
Upgrading to 1.2.3-0.20260402184705-988440dee05f (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/coder/code-marketplace affected?
Yes, github.com/coder/code-marketplace is affected in releases prior to 1.2.3-0.20260402184705-988440dee05f. Upgrade your dependency to 1.2.3-0.20260402184705-988440dee05f or later.
What CWE is associated with CVE-2026-35454?
CVE-2026-35454 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-35454?
Run the dependency tree command: 'inspect dependencies for github.com/coder/code-marketplace'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8x9r-hvwg-c55h",
  "modified" : "2026-04-07T14:21:34Z",
  "published" : "2026-04-04T06:26:02Z",
  "aliases" : [ "CVE-2026-35454" ],
  "summary" : "Code Extension Marketplace: Zip Slip Path Traversal",
  "details" : "# 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",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/code-marketplace"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.3-0.20260402184705-988440dee05f"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/coder/code-marketplace/security/advisories/GHSA-8x9r-hvwg-c55h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35454"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/code-marketplace/commit/988440dee05fceef8400ed725badc604dbf90792"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coder/code-marketplace"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/code-marketplace/releases/tag/v2.4.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-04T06:26:02Z",
    "nvd_published_at" : "2026-04-06T22:16:23Z"
  }
}