Skip to content
Heist/ feed
Back to feed
HighFix available

@tinacms/web-components: `tina-markdown` writes rich-text link URLs into `href` without scheme validation, allowing stored XSS

Type: advisorySources: OSV

### Summary `` renders a rich-text AST into the DOM and, for `a` nodes, assigns the node's URL straight to the anchor's `href` with no scheme check. A link authored in the CMS as `javascript:…` renders as a live `javascript:` anchor, so a visitor who clicks it executes attacker-supplied script in the site's origin. Every sibling renderer in the repository already sanitizes these URLs; this one does not. ### Details The unvalidated sink: ``` packages/@tinacms/web-components/src/tina-markdown.js:67-69 if (node.type === 'html' || node.type === 'html_inline') { return DOMPurify.sanitize(node.value, { RETURN_DOM_FRAGMENT: true }); } packages/@tinacms/web-components/src/tina-markdown.js:75 if (node.url && node.type === 'a') el.href = node.url; packages/@tinacms/web-components/src/tina-markdown.js:76 if (node.url && node.type === 'img') el.src = node.url; ``` `node.url` comes from the `content` attribute the site populates from the TinaCMS content API (`:169-176`), i.e. whatever a content author typed into a rich-text field. The DOMPurify call at `:68` handles only raw-HTML node values and returns before the anchor branch, so it never inspects `node.url`. Line 75 is a direct property assignment — no HTML parser, no sanitizer. The `mode: 'open'` shadow root (`:164-167`) provides no script isolation. The guard that exists in every sibling renderer: ``` packages/@tinacms/mdx/src/sanitize-url.ts:10 allowedSchemes = ['http','https','mailto','tel','xref'] packages/tinacms/src/rich-text/in

Products
@tinacms/web-components
Affected versions
Not specified
Fixed versions
0.2.1
CVEs
CVE-2026-108260
Confirmed fixed CVEs
Not specified
Updated in this feed
28 Oct 2026, 13:05 UTC · Revision 1

Source evidence

@tinacms/web-components: `tina-markdown` writes rich-text link URLs into `href` without scheme validation, allowing stored XSS

core-osv · Original source

Published 9 Oct 2026, 20:56 UTC

### Summary `` renders a rich-text AST into the DOM and, for `a` nodes, assigns the node's URL straight to the anchor's `href` with no scheme check. A link authored in the CMS as `javascript:…` renders as a live `javascript:` anchor, so a visitor who clicks it executes attacker-supplied script in the site's origin. Every sibling renderer in the repository already sanitizes these URLs; this one does not. ### Details The unvalidated sink: ``` packages/@tinacms/web-components/src/tina-markdown.js:67-69 if (node.type === 'html' || node.type === 'html_inline') { return DOMPurify.sanitize(node.value, { RETURN_DOM_FRAGMENT: true }); } packages/@tinacms/web-components/src/tina-markdown.js:75 if (node.url && node.type === 'a') el.href = node.url; packages/@tinacms/web-components/src/tina-markdown.js:76 if (node.url && node.type === 'img') el.src = node.url; ``` `node.url` comes from the `content` attribute the site populates from the TinaCMS content API (`:169-176`), i.e. whatever a content author typed into a rich-text field. The DOMPurify call at `:68` handles only raw-HTML node values and returns before the anchor branch, so it never inspects `node.url`. Line 75 is a direct property assignment — no HTML parser, no sanitizer. The `mode: 'open'` shadow root (`:164-167`) provides no script isolation. The guard that exists in every sibling renderer: ``` packages/@tinacms/mdx/src/sanitize-url.ts:10 allowedSchemes = ['http','https','mailto','tel','xref'] packages/tinacms/src/rich-text/in

osv:GHSA-c42q-qvc3-j6vg

@tinacms/web-components

Fixed versions: 0.2.1

Complete source record
{
  "id": "a976c0ee22b3e3ea5a35660135b8db9cfe952ccccfc60c81e474992bcea5a0f2",
  "url": "https://osv.dev/vulnerability/GHSA-c42q-qvc3-j6vg",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "@tinacms/web-components: `tina-markdown` writes rich-text link URLs into `href` without scheme validation, allowing stored XSS",
    "summary": "### Summary `` renders a rich-text AST into the DOM and, for `a` nodes, assigns the node's URL straight to the anchor's `href` with no scheme check. A link authored in the CMS as `javascript:…` renders as a live `javascript:` anchor, so a visitor who clicks it executes attacker-supplied script in the site's origin. Every sibling renderer in the repository already sanitizes these URLs; this one does not. ### Details The unvalidated sink: ``` packages/@tinacms/web-components/src/tina-markdown.js:67-69 if (node.type === 'html' || node.type === 'html_inline') { return DOMPurify.sanitize(node.value, { RETURN_DOM_FRAGMENT: true }); } packages/@tinacms/web-components/src/tina-markdown.js:75 if (node.url && node.type === 'a') el.href = node.url; packages/@tinacms/web-components/src/tina-markdown.js:76 if (node.url && node.type === 'img') el.src = node.url; ``` `node.url` comes from the `content` attribute the site populates from the TinaCMS content API (`:169-176`), i.e. whatever a content author typed into a rich-text field. The DOMPurify call at `:68` handles only raw-HTML node values and returns before the anchor branch, so it never inspects `node.url`. Line 75 is a direct property assignment — no HTML parser, no sanitizer. The `mode: 'open'` shadow root (`:164-167`) provides no script isolation. The guard that exists in every sibling renderer: ``` packages/@tinacms/mdx/src/sanitize-url.ts:10 allowedSchemes = ['http','https','mailto','tel','xref'] packages/tinacms/src/rich-text/in",
    "evidence": "osv:GHSA-c42q-qvc3-j6vg",
    "products": [
      {
        "name": {
          "value": "@tinacms/web-components",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.2.1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "GHSA-c42q-qvc3-j6vg",
      "aliases": [
        "CVE-2026-108260",
        "GHSA-c42q-qvc3-j6vg"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.2.1"
                }
              ]
            }
          ],
          "package": {
            "name": "@tinacms/web-components",
            "purl": "pkg:npm/%40tinacms/web-components",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-c42q-qvc3-j6vg/GHSA-c42q-qvc3-j6vg.json",
            "last_known_affected_version_range": "<= 0.2.0"
          }
        }
      ],
      "modified": "2026-10-09T21:15:04.363433366Z",
      "provider": "osv",
      "references": [
        "https://github.com/tinacms/tinacms/security/advisories/GHSA-c42q-qvc3-j6vg",
        "https://github.com/tinacms/tinacms/pull/7523",
        "https://github.com/tinacms/tinacms/commit/5295e077f0d279c35686a0e481a15e33a4877e3b",
        "https://github.com/tinacms/tinacms",
        "https://github.com/tinacms/tinacms/releases/tag/@tinacms/web-components@0.2.1"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79",
          "CWE-83"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2026-10-09T20:56:45Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-108260",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 124250,
  "published_at": "2026-10-09T20:56:45+00:00"
}