Vulnerability DatabaseGHSA-4pv6-c8h9-q8v6

GHSA-4pv6-c8h9-q8v6: 
JavaScript vulnerability analysis and mitigation

Summary

TinyMCE's sandbox_iframes and convert_unsafe_embeds options add sandbox="" to iframes and convert <object> and <embed> elements into safer alternatives. The media plugin rebuilt some media content with a parser that did not apply these options, so attacker supplied iframes and embeds were left unsandboxed or unconverted in the editor and in saved content. This affects TinyMCE 6.8.0 and later and is fixed in 8.11.1.

Details

When content contained an <iframe>, <object> or <embed> inside a <video> or <audio> element, the media plugin parsed the media element's children again to build its preview. That second parse ignored sandbox_iframes, sandbox_iframes_exclusions and convert_unsafe_embeds, so the nested iframe loaded in the live editor without a sandbox and the nested object and embed elements were kept as they were. The media plugin also turns media placeholder elements back into real media elements when content is serialized, using the placeholder's data-mce-object, data-mce-p-* and data-mce-html attributes. Placeholders supplied in the input content were rebuilt with the same parser, so getContent() returned an <iframe> without sandbox and <object> or <embed> elements without conversion. This does not run anything in the editor but the unsafe markup is stored and rendered by any page that displays the saved HTML. The fix makes every parse done by the media plugin use the editor's sandbox_iframes, sandbox_iframes_exclusions and convert_unsafe_embeds settings. Nested and placeholder based media now produce the same sandboxed or converted output as top level media.

Proof of concept

Nested iframe in a video element:

tinymce.init({
  selector: 'textarea',
  plugins: 'media'
  // sandbox_iframes and convert_unsafe_embeds are true by default since 7.0.0
}).then(([ editor ]) => {
  editor.setContent('<video controls><iframe src="https://attacker.example/"></iframe></video>');
  // The iframe in the editor body has no sandbox attribute and loads https://attacker.example/
  console.log(editor.getContent());
  // <p><video controls="controls" width="300" height="150"><iframe src="https://attacker.example/"></iframe></video></p>
});

Forged media placeholders:

tinymce.init({
  selector: 'textarea',
  plugins: 'media'
  // sandbox_iframes and convert_unsafe_embeds are true by default since 7.0.0
}).then(([ editor ]) => {
  editor.setContent(
    '<p><span data-mce-object="iframe" data-mce-p-src="https://attacker.example/">x</span></p>' +
    '<p><span data-mce-object="embed" data-mce-p-src="https://attacker.example/x" data-mce-p-type="text/html">x</span></p>'
  );
  console.log(editor.getContent());
  // <p><iframe src="https://attacker.example/"></iframe></p>
  // <p><embed src="https://attacker.example/x" type="text/html"></p>
  // Expected: both rendered as <iframe ... sandbox="">
});

Impact

Anyone who can supply content to an editor with the media plugin enabled can embed a frame from an origin they control that is not sandboxed. The frame can run scripts in its own origin, navigate the top level page, open popups and show forms, which enables phishing and redirection inside the editor and on pages that render the saved content. The frame cannot read or modify the editor or the host page because it stays cross origin, so this is not script execution in the integrator's origin.

Workarounds

  • Disable the media plugin if embedded media is not required.
  • Sanitize stored HTML on the server before rendering it, adding sandbox="" to iframes and removing or converting object and embed elements.
  • Apply a Content Security Policy with a restrictive frame-src on pages that display saved content.

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