{"id":"CVE-2026-44429","aliases":["CVE-2026-44429","GHSA-rqv2-m695-f8j4","GO-2026-5637"],"related":[],"kind":"vulnerability","state":"published","title":"MCP Registry: Stored XSS in catalogue UI via attribute-quote breakout in publisher-controlled `websiteUrl`","summary":"The MCP Registry provides MCP clients with a list of MCP servers, like an app store for MCP servers. Prior to 1.7.7, the public catalogue UI served at GET / (file internal/api/handlers/v0/ui_index.html) is vulnerable to stored cross-site scripting via the server.websiteUrl field of any published server.json. Server-side validation in internal/validators/validators.go (validateWebsiteURL) only checks that the URL parses, is absolute, and uses the https scheme; it does not reject quote characters. Client-side, the value is interpolated into a double-quoted href attribute via innerHTML, using a homegrown escapeHtml helper that performs the standard textContent → innerHTML round-trip. Per the HTML serialisation algorithm, that round-trip encodes only &, <, > and U+00A0 inside text nodes — it does not encode \" or '. A literal \" in websiteUrl therefore breaks out of the href attribute, allowing arbitrary on* event handlers to be appended to the same <a> element. The Content-Security-Policy on / is script-src 'self' 'unsafe-inline' https://cdn.tailwindcss.com, so the injected event handlers execute. Any user able to obtain a publish token (e.g. via POST /v0/auth/github-at with their own GitHub account, or POST /v0/auth/none on a deployment that has anonymous auth enabled) can plant a poisoned record visible to every visitor of the registry homepage. This vulnerability is fixed in 1.7.7.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The MCP Registry provides MCP clients with a list of MCP servers, like an app store for MCP servers. Prior to 1.7.7, the public catalogue UI served at GET / (file internal/api/handlers/v0/ui_index.html) is vulnerable to stored cross-site scripting via the server.websiteUrl field of any published server.json. Server-side validation in internal/validators/validators.go (validateWebsiteURL) only checks that the URL parses, is absolute, and uses the https scheme; it does not reject quote characters. Client-side, the value is interpolated into a double-quoted href attribute via innerHTML, using a homegrown escapeHtml helper that performs the standard textContent → innerHTML round-trip. Per the HTML serialisation algorithm, that round-trip encodes only &, <, > and U+00A0 inside text nodes — it does not encode \" or '. A literal \" in websiteUrl therefore breaks out of the href attribute, allowing arbitrary on* event handlers to be appended to the same <a> element. The Content-Security-Policy on / is script-src 'self' 'unsafe-inline' https://cdn.tailwindcss.com, so the injected event handlers execute. Any user able to obtain a publish token (e.g. via POST /v0/auth/github-at with their own GitHub account, or POST /v0/auth/none on a deployment that has anonymous auth enabled) can plant a poisoned record visible to every visitor of the registry homepage. This vulnerability is fixed in 1.7.7.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe public catalogue UI served at `GET /` (file `internal/api/handlers/v0/ui_index.html`) is vulnerable to stored cross-site scripting via the `server.websiteUrl` field of any published `server.json`. Server-side validation in `internal/validators/validators.go` (`validateWebsiteURL`) only checks that the URL parses, is absolute, and uses the `https` scheme; it does not reject quote characters. Client-side, the value is interpolated into a double-quoted `href` attribute via `innerHTML`, using a homegrown `escapeHtml` helper that performs the standard `textContent` → `innerHTML` round-trip. Per the HTML serialisation algorithm, that round-trip encodes only `&`, `<`, `>` and U+00A0 inside text nodes — it does **not** encode `\"` or `'`. A literal `\"` in `websiteUrl` therefore breaks out of the `href` attribute, allowing arbitrary `on*` event handlers to be appended to the same `<a>` element. The Content-Security-Policy on `/` is `script-src 'self' 'unsafe-inline' https://cdn.tailwindcss.com`, so the injected event handlers execute.\n\nAny user able to obtain a publish token (e.g. via `POST /v0/auth/github-at` with their own GitHub account, or `POST /v0/auth/none` on a deployment that has anonymous auth enabled) can plant a poisoned record visible to every visitor of the registry homepage.\n\n## Affected component\n\n- Validator: `internal/validators/validators.go` — `validateWebsiteURL` (lines 153–199)\n- Sink: `internal/api/handlers/v0/ui_index.html` — `toggleDetails(card, item)` at line 432, the `href` attribute built around `escapeHtml(server.websiteUrl)`\n- Helper: `escapeHtml` defined at `internal/api/handlers/v0/ui_index.html` lines 494–498\n\n## Proof of concept\n\n1. Obtain a Registry JWT for any namespace you control (a GitHub OAuth exchange against a throwaway account suffices):\n\n   ```bash\n   TOKEN=$(curl -sS -X POST https://registry.modelcontextprotocol.io/v0/auth/github-at \\\n        -H 'Content-Type: application/json' \\\n        -d '{\"github_token\":\"<gh-pat>\"}' | jq -r .registry_token)\n   ```\n\n2. Publish a server with a poisoned `websiteUrl`. The literal `\"` is preserved end-to-end:\n\n   ```bash\n   curl -sS -X POST https://registry.modelcontextprotocol.io/v0/publish \\\n     -H \"Authorization: Bearer $TOKEN\" \\\n     -H 'Content-Type: application/json' \\\n     --data-binary @- <<'EOF'\n   {\n     \"$schema\": \"https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json\",\n     \"name\":  \"io.github.<your-account>/xss-poc\",\n     \"version\": \"0.0.1\",\n     \"description\": \"hover the website link\",\n     \"websiteUrl\": \"https://example.com/\\\"onmouseover=alert(document.domain)//\"\n   }\n   EOF\n   ```\n\n3. Visit `https://registry.modelcontextprotocol.io/`, search for `xss-poc`, click the card to expand it, then hover the **Website** link in the details panel. The injected `onmouseover` fires and `alert(document.domain)` runs on the `registry.modelcontextprotocol.io` origin.\n\n## Why server-side validation does not catch this\n\nGo's `net/url.Parse` accepts literal `\"` in the path component:\n\n```\ninput=\"https://example.com/\\\"onmouseover=alert(1)//\"  IsAbs=true  Scheme=\"https\"  Path=\"/\\\"onmouseover=alert(1)//\"\n```\n\nNeither the Huma `format:\"uri\"` annotation nor `validateWebsiteURL`'s scheme/`IsAbs` triplet rejects this string. The architecture's existing protection — `repository.url` is regex-locked to `^https?://(www\\.)?github\\.com/[\\w.-]+/[\\w.-]+/?$` and therefore cannot contain quotes — does not extend to `websiteUrl`, which has no allowlist.\n\n## Why client-side `escapeHtml` does not catch this\n\n```js\nfunction escapeHtml(text) {\n    const div = document.createElement('div');\n    div.textContent = text;\n    return div.innerHTML;\n}\n```\n\nPer the HTML5 spec (§13.3 Serialising HTML fragments), the only characters encoded inside the text content of an element are `&`, `<`, `>`, and U+00A0. `\"` and `'` are **not** encoded because in a text-content context they are not special. The helper is therefore safe in element-text contexts (where it is correctly used for `name`, `version`, `description`, etc.) but unsafe inside an attribute value, which is precisely where it is invoked for `href` on lines 432 and 426.\n\n## Impact\n\n- Stored XSS on the official MCP Registry homepage. The malicious entry sits in the public catalogue alongside legitimate ones; any user expanding the entry triggers the payload.\n- Because the page is served on the official `registry.modelcontextprotocol.io` origin, the injected script can:\n  - Read and overwrite `localStorage` (`baseUrl`, `customUrl`), pinning the user's subsequent reads to an attacker-controlled \"Custom\" base URL.\n  - Issue any same-origin or cross-origin XHR (`connect-src *` is granted).\n  - Phish for Registry JWTs by injecting fake auth flows on the trusted origin.\n- The CSP `script-src 'self' 'unsafe-inline' https://cdn.tailwindcss.com` does not block this because `'unsafe-inline'` permits inline event-handler attributes.\n\n## Suggested remediation (any one suffices)\n\n1. Replace the homegrown `escapeHtml` with an attribute-safe encoder that also escapes `\"`, `'`, backtick, and `=` — the OWASP HTML attribute-encoding rule.\n2. Avoid building the `href` via string templates. Use `setAttribute('href', value)` instead — `setAttribute` is not subject to HTML tokenisation, so no breakout is possible.\n3. Tighten `validateWebsiteURL` to reject any URL whose raw bytes contain `\"`, `'`, `<`, `>`, ` `, `\\t`, or `\\n`, or — conservatively — store the canonical re-serialised form (`parsedURL.String()` percent-encodes such characters in the path).\n4. Drop `'unsafe-inline'` from `script-src` after auditing the inline scripts on the page.\n\nApproach (3) is the smallest server-side change and immediately neutralises the exploit for any new publishes; approaches (1) or (2) close the class of bug at the sink so future fields with similar patterns are safe by default.","format":"markdown","source":"ghsa"},{"lang":"en","text":"MCP Registry vulnerable to stored XSS in catalogue UI via attribute-quote breakout in publisher-controlled `websiteUrl` in github.com/modelcontextprotocol/registry","format":"markdown","source":"go"},{"lang":"es","text":"El Registro MCP proporciona a los clientes MCP una lista de servidores MCP, como una tienda de aplicaciones para servidores MCP. Antes de la versión 1.7.7, la interfaz de usuario del catálogo público servida en GET / (archivo internal/api/handlers/v0/ui_index.html) es vulnerable a cross-site scripting almacenado a través del campo server.websiteUrl de cualquier server.json publicado. La validación del lado del servidor en internal/validators/validators.go (validateWebsiteURL) solo verifica que la URL se analiza, sea absoluta y use el esquema HTTPS; no rechaza los caracteres de comillas. Del lado del cliente, el valor se interpola en un atributo href entre comillas dobles a través de innerHTML, usando un ayudante escapeHtml de desarrollo propio que realiza el viaje de ida y vuelta estándar de textContent ? innerHTML. Según el algoritmo de serialización HTML, ese viaje de ida y vuelta codifica solo &, <, > y U+00A0 dentro de los nodos de texto - no codifica “ ni ’. Una comilla doble literal ” en websiteUrl, por lo tanto, sale del atributo href, permitiendo que controladores de eventos on arbitrarios se añadan al mismo elemento [a]. La Content-Security-Policy en / es script-src ’self’ ’unsafe-inline’ https://cdn.tailwindcss.com, por lo que los controladores de eventos inyectados se ejecutan. Cualquier usuario capaz de obtener un token de publicación (por ejemplo, a través de POST /v0/auth/github-at con su propia cuenta de GitHub, o POST /v0/auth/none en una implementación que tenga la autenticación anónima habilitada) puede plantar un registro envenenado visible para cada visitante de la página de inicio del registro. Esta vulnerabilidad se corrige en la versión 1.7.7.","source":"nvd"}],"published":"2026-05-08T17:18:32.000Z","modified":"2026-10-26T14:10:00.130Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:L","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:L","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:L","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-116"],"affected":[{"ranges":[{"version":"< 1.7.7","status":"affected"}],"vendor":"modelcontextprotocol","product":"registry","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.7.7"}],"ecosystem":"Go","package":"github.com/modelcontextprotocol/registry","purl":"pkg:golang/github.com/modelcontextprotocol/registry","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.7.7"}],"ecosystem":"Go","package":"github.com/modelcontextprotocol/registry","purl":"pkg:golang/github.com/modelcontextprotocol/registry","source":"go"},{"ranges":[{"status":"affected","fixed":"1.7.7"}],"vendor":"lfprojects","product":"mcp_registry","cpe":"cpe:2.3:a:lfprojects:mcp_registry:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/modelcontextprotocol/registry/security/advisories/GHSA-rqv2-m695-f8j4","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44429","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/modelcontextprotocol/registry/pull/1249","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/modelcontextprotocol/registry/commit/78b7bbde07948049b916d76b4769faee461ff930","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/modelcontextprotocol/registry","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/modelcontextprotocol/registry/releases/tag/v1.7.7","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-05-15T14:19:51.887Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44429","url":"https://www.cve.org/CVERecord?id=CVE-2026-44429","licence":"CVE Terms of Use","modified":"2026-05-15T14:20:27.564Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rqv2-m695-f8j4","url":"https://github.com/advisories/GHSA-rqv2-m695-f8j4","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:55.367Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5637","url":"https://pkg.go.dev/vuln/GO-2026-5637","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:36.340Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44429","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44429","licence":"Public domain","modified":"2026-10-26T14:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:21.785Z","epss":{"score":0.00167,"percentile":0.06304,"date":"2026-12-01T12:00:22.000Z"}}