Vulnerability DatabaseGHSA-4fq4-f4jg-3vmx

GHSA-4fq4-f4jg-3vmx: 
JavaScript vulnerability analysis and mitigation

Summary

TinyMCE adds sandbox="" to iframe elements when sandbox_iframes is enabled (the default since 7.0.0), except for iframes whose host is listed in sandbox_iframes_exclusions. The host check did not parse URLs the same way browsers do. A crafted iframe src could be matched against an excluded host (such as the default youtube.com) while the browser loads a different origin, leaving the iframe without a sandbox attribute. Affected: TinyMCE 7.0.0 to 8.11.0. Fixed in 8.11.1.

Details

The excluded host was extracted with a regular expression whose userinfo part accepted ? and #. For https://example.com?@youtube.com/ it read youtube.com as the host. Browsers read example.com as the host and ?@youtube.com/ as the query, so the iframe skipped sandboxing but loaded example.com. The same regular expression matched schemeless values starting with www. or containing @, such as www.youtube.com/../path or x@youtube.com/../path. Browsers resolve these as relative URLs against the editor document, so an unsandboxed iframe could load a document from the editor's own origin. When the document's own host was listed in sandbox_iframes_exclusions and relative_urls or remove_script_host was enabled, URL conversion kept repeated slashes in the path. With document_base_url: 'https://example.com/', the src https://example.com///attacker.example/payload was excluded from sandboxing and then rewritten to //attacker.example/payload, which browsers load from attacker.example. The fix applies exclusions only to absolute http:// and https:// URLs and reads the host with the browser's URL parser. URL conversion no longer rewrites a URL when the original or the converted URL would point to a different origin than document_base_url.

Proof of concept

With default options:

tinymce.init({ selector: 'textarea' }).then(([ editor ]) => {
  editor.setContent('<iframe src="https://example.com?@youtube.com/"></iframe>');
  console.log(editor.getContent());
  // <p><iframe src="https://example.com?@youtube.com/"></iframe></p>  (no sandbox attribute)
});

The iframe loads https://example.com/?@youtube.com/ without a sandbox. https://example.com#@youtube.com/ behaves the same way. With the document host excluded:

tinymce.init({
  selector: 'textarea',
  document_base_url: 'https://example.com/',
  sandbox_iframes_exclusions: [ 'example.com' ],
  relative_urls: true
}).then(([ editor ]) => {
  editor.setContent('<iframe src="https://example.com///attacker.example/payload"></iframe>');
  console.log(editor.getContent());
  // <p><iframe src="//attacker.example/payload"></iframe></p>  (no sandbox attribute)
});

Impact

An attacker who can supply content to the editor (by paste, by stored content loaded into the editor, or through any API that sets content) can embed an unsandboxed iframe from an arbitrary origin. The missing sandbox attribute is kept in the content TinyMCE outputs, so it also affects pages that later display that content. The framed page can run scripts, submit forms, display deceptive content such as fake login prompts and, with user interaction, navigate the top-level page or open popups. It cannot read or modify the parent document, because it is cross-origin. The schemeless variant loads an unsandboxed same-origin document. It only matters where the attacker can already host a document on the editor's origin, for example through file uploads.

Workarounds

  • Set sandbox_iframes_exclusions: [] to sandbox all iframes.
  • Do not include the editor document's own host in sandbox_iframes_exclusions.

Fix

To avoid this vulnerability: Upgrade to TinyMCE 8.11.1 or higher.


Source: NVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-j7r2-xppq-m353HIGH7.5
  • JavaScript logoJavaScript
  • websocket-driver
NoYesDec 03, 2026
GHSA-hr8p-3p6h-9fw3MEDIUM6.1
  • JavaScript logoJavaScript
  • tinymce
NoYesDec 03, 2026
GHSA-4pv6-c8h9-q8v6MEDIUM4.7
  • JavaScript logoJavaScript
  • tinymce
NoYesDec 03, 2026
GHSA-4fq4-f4jg-3vmxMEDIUM4.7
  • JavaScript logoJavaScript
  • tinymce
NoYesDec 03, 2026
CVE-2026-142608NONEN/A
  • JavaScript logoJavaScript
  • mongoose
NoYesDec 02, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management