fix(deps): update dependency tinymce to v7 [security] #1236
+12
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^5.10.4->^7.0.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
CVE-2024-29881
Impact
A cross-site scripting (XSS) vulnerability was discovered in TinyMCE’s content loading and content inserting code. A SVG image could be loaded though an
objectorembedelement and that image could potentially contain a XSS payload.Fix
TinyMCE 6.8.1 introduced a new
convert_unsafe_embedsoption to automatically convertobjectandembedelements respective of theirtypeattribute. From TinyMCE 7.0.0 onwards, theconvert_unsafe_embedsoption is enabled by default.Workarounds
If you are using TinyMCE 6.8.1 or higher, set
convert_unsafe_embedsto true. For any earlier versions, a custom NodeFilter is recommended to remove or modify anyobjectorembedelements. This can be added using theeditor.parser.addNodeFilterandeditor.serializer.addNodeFilterAPIs.Acknowledgements
Tiny Technologies would like to thank Toni Huttunen of Fraktal Oy for discovering this vulnerability.
References
CVE-2024-29203
Impact
A cross-site scripting (XSS) vulnerability was discovered in TinyMCE’s content insertion code. This allowed
iframeelements containing malicious code to execute when inserted into the editor. Theseiframeelements are restricted in their permissions by same-origin browser protections, but could still trigger operations such as downloading of malicious assets.Fix
TinyMCE 6.8.1 introduced a new
sandbox_iframesboolean option which adds thesandbox=""attribute to everyiframeelement by default when enabled. This will prevent cross-origin, and in special cases same-origin, XSS by embedded resources iniframeelements. From TinyMCE 7.0.0 onwards the default value of this option istrue.In TinyMCE 7.0.0 a new
sandbox_iframes_exclusionsoption was also added, allowing a list of domains to be specified that should be excluded from having thesandbox=""attribute applied when thesandbox_iframesoption is enabled. By default, this option is set to an array of domains that are provided in embed code by popular websites. To sandboxiframeelements from every domain, set this option to[].Workarounds
The HTTP Content-Security-Policy (CSP)
frame-srcorobject-srccan be configured to restrict or block the loading of unauthorized URLS. Refer to the TinyMCE Content Security Policy Guide.References
CVE-2024-38356
Impact
A cross-site scripting (XSS) vulnerability was discovered in TinyMCE’s content extraction code. When using the
noneditable_regexpoption, specially crafted HTML attributes containing malicious code were able to be executed when content was extracted from the editor.Patches
This vulnerability has been patched in TinyMCE 7.2.0, TinyMCE 6.8.4 and TinyMCE 5.11.0 LTS by ensuring that, when using the
noneditable_regexpoption, any content within an attribute is properly verified to match the configured regular expression before being added.Fix
To avoid this vulnerability:
References
For more information
If you have any questions or comments about this advisory:
CVE-2024-38357
Impact
A cross-site scripting (XSS) vulnerability was discovered in TinyMCE’s content parsing code. This allowed specially crafted noscript elements containing malicious code to be executed when that content was loaded into the editor.
Patches
This vulnerability has been patched in TinyMCE 7.2.0, TinyMCE 6.8.4 and TinyMCE 5.11.0 LTS by ensuring that content within noscript elements are properly parsed.
Fix
To avoid this vulnerability:
Acknowledgements
Tiny thanks Malav Khatri and another reporter for their help identifying this vulnerability.
References
For more information
If you have any questions or comments about this advisory:
Release Notes
tinymce/tinymce (tinymce)
v7.0.0Compare Source
Added
license_keyoption that must be set togplor a valid license key. #TINY-10681sandbox_iframes_exclusionsoption that holds a list of URL host names to be excluded from iframe sandboxing whensandbox_iframesis set totrue. #TINY-10350valid_childrenoption and Schema.addValidChildren API. #TINY-9979triggerproperty for block text pattern configurations, allowing pattern activation with either Space or Enter keys. #TINY-10324datais now a valid element in the Schema. #TINY-10611Improved
ToolbarButtonandToolbarToggleButton. #TINY-10487collectionwhich is rendered inside a dialog, on mouse hover and keyboard focus. #TINY-9637Changed
convert_unsafe_embedseditor option is now defaulted totrue. #TINY-10351sandbox_iframeseditor option is now defaulted totrue. #TINY-10350highlight_on_focusoption now defaults to true, adding a focus outline to every editor. #TINY-10574tox-view__panehasposition: relativeinstead ofstatic. #TINY-10561tableplugin cell dialog. Thetableplugin row dialog now controls the row height by setting the height on thetrelement, not thetdelements. #TINY-10617td/thelements and only apply totrelements. #TINY-10589aria-placeholderattribute from editor body whenplaceholderoption is set. #TINY-10452tooltipproperty for dialog's footertogglebuttonis now optional. #TINY-10672media_url_resolveroption to use promises. #TINY-9154Stylesbespoke toolbar button fallback changed toFormatsifParagraphis not configured instyle_formatsoption. #TINY-10603Removed
force_hex_coloroption, with the default now being all colors are forced to hex format as lower case. #TINY-10436remove_trailing_brsoption from DomParser. #TINY-10454titleattribute on buttons with visible label. #TINY-10453InsertOrderedListandInsertUnorderedListcommands from core, these now only exist in thelistsplugin. #TINY-10644closeButtonfrom the notification API, close buttons in notifications are now required. #TINY-10646chconfiguration property has been removed. Use thetriggerproperty instead. #TINY-8929templateplugin. #TINY-10654Fixed
summaryelement when the caret was positioned between words. #TINY-10312blurevent as expected. #TINY-10310table_class_list. Also fixed being forced to pick the first class option. #TINY-6653List Properties...in the context menu. #TINY-10490link_default_targetoption wasn't considered when inserting a link viaquicklinktoolbar. #TINY-10439summaryelement within adetailselement nested in a list item no longer removes thesummaryelement. #TINY-10303event_rootoption. #TINY-10433selection.setContentto insert a block element would throw an unhandled exception. #TINY-10560table_style_by_cssis true, only the border attribute is set to 0 and border-width styling is no longer used. #TINY-10308v6.8.6Compare Source
v6.8.5Compare Source
v6.8.4Compare Source
v6.8.3Compare Source
Changed
Fixed
v6.8.2Compare Source
Fixed
fontfamily,fontsize,blocks, andstylesincorrectly used plural words in their accessible names. #TINY-10426alignbespoke select toolbar button had an accessible name that was misleading and grammatically incorrect in certain cases. #TINY-10435align,fontfamily,fontsize,blocks, andstyleswere incorrectly translated. #TINY-10426 #TINY-10435v6.8.1Compare Source
Improved
Fixed
schema.isWrapperandschema.isInlinedid not exclude node names that started with#which should not be considered as elements. #TINY-10385v6.8.0Compare Source
Added
StylesheetLoader.loadRawCssAPI that can be used to load CSS into a style element. #TINY-10352StylesheetLoader.unloadRawCssAPI that can be used to unload CSS that was loaded into a style element. #TINY-10352force_hex_coloreditor option. Option'always'converts all RGB & RGBA colours to hex,'rgb_only'will only convert RGB and not RGBA colours to hex,'off'won't convert any colours to hex. #TINY-9819default_font_stackeditor option that makes it possible to define what is considered a system font stack. #TINY-10290sandbox_iframesoption that controls whether iframe elements will be added asandbox=""attribute to mitigate malicious intent. #TINY-10348convert_unsafe_embedsoption that controls whether<object>and<embed>elements will be converted to more restrictive alternatives, namely<img>for image MIME types,<video>for video MIME types,<audio>audio MIME types, or<iframe>for other or unspecified MIME types. #TINY-10349Improved
size: 'large'argument in the dialog spec. #TINY-10209align,fontfamily,fontsize,blocks, andstylesdid not include their visible text labels in their accessible names. #TINY-10147Fixed
setProgressStateAPI would cause the window to be scrolled when the editor wasn't fully visible. #TINY-10172summaryelement extended its application to the content of the parentdetailselement. #TINY-10154forecolorandbackcolorbuttons. #TINY-9796addIconAPI documentation. #TINY-10230sizeargument was changed when redialling a dialog. #TINY-10209contenteditable="true"attribute within a table cell would not be treated as content and get removed if backspace or delete was being pressed. #TINY-10010detailselement would incorrectly merge its content. #TINY-10133getModifierStatedid not work on events passed through the editor as expected. #TINY-10263asyncfor editor rendering which caused visual blinking when reloading the editor in-place. #TINY-10249pinside alistvia delete or backspace would incorrectly try to move a parent element inside a child element. #TINY-10289accordionblock. #TINY-10291fontsizeinputtoolbar item was causing console warnings when toolbar items were clicked. #TINY-10330livia enter inside a nested list would not inherit styles from the sourceli. #TINY-10316v6.7.3Compare Source
Changed
setContent,insertContent, andresetContentAPIs. #TINY-10305Fixed
getContentandsetContentAPIs with theformat: 'raw'option, which also affected theresetContentAPI and the draft restoration feature of the Autosave plugin. #TINY-10305v6.7.2Compare Source
Fixed
getModifierStatedid not work on events passed through the editor as expected. #TINY-10263asyncfor editor rendering which caused visual blinking when reloading the editor in-place. #TINY-10249accordiontoggling with the Enter key press would behave incorrectly on Safari. #TINY-10177v6.7.1Compare Source
Fixed
getContentandsetContentAPIs with theformat: 'raw'option, which also affected theresetContentAPI and the draft restoration feature of the Autosave plugin. #TINY-10236v6.7.0Compare Source
Added
help_accessibilityoption displays the keyboard shortcut to open the in-application help in the status bar. #TINY-9379InsertNewBlockBeforecommand which inserts an empty block before the block containing the current selection. #TINY-10022InsertNewBlockAftercommand which inserts an empty block after the block containing the current selection. #TINY-10022Improved
Changed
UndoLevelTypefromenumto union type so that it is easier to use. #TINY-9764Fixed
<div>elements only created a partial list. #TINY-9872iframedialog components. #TINY-9815<details>element if it was nested within another<details>element. #TINY-9965<li>elements that only contained<br>tags sometimes caused a crash. #TINY-6888<summary>element from a<details>element by dragging and dropping. #TINY-9960<summary>elements if content containing block elements was dragged-and-dropped inside them. #TINY-9960<script>tags in the editor body to<image>tags. #TINY-10007<details>element when it is the first or last content element. Pressing the Up or Down arrow key now inserts a block element before or after the<details>element. #TINY-9827contenteditable="true"attribute within a noneditable root was deleted when the Backspace key was pressed. #TINY-10011color_colsoption was not respected when set to the value 5 with a customcolor_mapspecified. #TINY-10126<summary>element removed the entire<details>element if it had no other content. #TINY-10123v6.6.2Compare Source
Fixed
streamContent: trueiframe dialog component. #TINY-10128v6.6.1Compare Source
Added
pad_empty_with_br. Set totrueto pad empty block elements with<br>tags instead of the character entity. #TINY-9861Improved
streamContent: trueset are now throttled to 500ms intervals. #TINY-10097Changed
Fixed
streamContent: trueiframe dialog component. #TINY-10078streamContent: truewas set. #TINY-10109streamContent: trueiframe dialog component with content lacking an HTML document type declaration. #TINY-10110iframedialog components did not highlight when focused. #TINY-10101color_colsoption was not respected when a customcolor_mapwas defined. #TINY-10098color_colsoptions were were not rounded to the nearest number when set to a decimal number. #TINY-9737v6.6.0Compare Source
Added
bottom— for inline dialog configurations that anchors the dialog to the bottom of the editor. #TINY-9888persistent— for inline dialog configurations that will stop the dialog closing when clicking away from it. #TINY-9991ai,ai-promptandsendicons. #TINY-9942streamContent— for theiframedialog component. This causessetData()to update content without reloading the frame, and end scroll positions will be maintained as new content streams in. #TINY-10032border— for theiframedialog component that allows a border to be added. #TINY-10049align— for the label dialog component that controls text alignment. #TINY-10058Improved
iframedialog component now has a minimum height of 200px. #TINY-10059ui_mode: 'split'option is set. #TINY-9385Changed
alertbannerdialog component is no longer clickable if the URL field is not specified. #TINY-10013Fixed
sizesetting to have no effect. #TINY-10015v6.5.1Compare Source
Fixed
v6.5.0Compare Source
Added
hhash parameter in Vimeo video URLs in the Media plugin. #TINY-9830table_merge_content_on_pasteoption which disables the merging behaviour when pasting a table inside an existing table. #TINY-9808defaultExpandedIdsandonToggleExpandoptions to thetreecomponent config. #TINY-9653defaultSelectedIdoption to thetreecomponent config. #TINY-9715accordionplugin with theInsertAccordioncommand. #TINY-9730accordionandaccordion-toggleicons. #TINY-9789details_initial_stateanddetails_serialized_stateoptions. #TINY-9732init_content_syncoption that initializes the editor iframe usingdocument.writeinstead ofsrcdoc. #TINY-9818newdocument_contentoption that sets the content presented in the editor on choosing File -> New document or pressing the New document toolbar button. #TINY-9839editable_rootoption that can be set tofalseto prevent editing of the editor’s root element. #TINY-9839editor.setEditableRootAPI that sets the editable state of the editor root element. #TINY-9839editor.hasEditableRootAPI that returnstrueorfalsedepending on the editable state of the editor root element. #TINY-9839EditableRootStateChangeevent that gets dispatched when the state of the editable root is changed. #TINY-9839dl,dt,dd,ol, andstrongelements in dialog body content. #TINY-9919Improved
iconfield for a dialog’s footertogglebuttonis no longer mandatory. #TINY-9757contenteditable="false"attribute. #TINY-9669codesampleplugin dialog and thetemplateplugin dialog to use thelistboxcomponent to match other dialogs. #TINY-9630dataTransferproperty of drag and drop events for elements with acontenteditable="false"attribute. #TINY-9601tabpaneltab labels are now allowed to word wrap for better readability with long labels. #TINY-9947detailselements in the output HTML. #TINY-9959summaryelements so that they can be properly edited. #TINY-9959Changed
caption,addressanddtelements no longer incorrectly allow non-inline child elements when the editor schema is set to HTML 4. #TINY-9768classinstead ofidto identify SVG elements that should change color. #TINY-9844<a>— no longer incorrectly allow non-inline child elements when the editor schema is set to HTML 4. #TINY-9805mediumwidth for better readability. #TINY-9947Fixed
treecomponent, a selected item in a directory would not stay selected after collapsing the directory. #TINY-9715contenteditable="false"attribute set. #TINY-9664contenteditable="false"attribute set in a root with acontenteditable="false"attribute set. #TINY-9460mediaplugin dialog. #TINY-8714<br>tag. #TINY-9696mediaplugin dialog by converting the Media Embed element to a standalone iframe. #TINY-8714advlistplugin buttons. #TINY-9680dirattribute on elements with acontenteditable="false"attribute set when these elements were within a root with acontenteditable="false"attribute set. #TINY-9662not-allowedmouse pointer. #TINY-9758contenteditable="false"context. #TINY-9678contenteditable="false"context. #TINY-9678canApply, was not returningfalsewhen the selection was in acontenteditable="false"context. #TINY-9678dragendevent would sometimes not fire when Firefox was the host browser. #TINY-9694unlinkeditor command. #TINY-9739directionCSS property set. #TINY-9314contenteditableattribute set tofalse. #TINY-9565beforeinputandinputevents. #TINY-9829blockquoteelement could fail when the insertion point was positioned at the end of theblockquote. #TINY-9794<html>tag were not parsed before being rendered for preview. #TINY-9867aria-describedbyattribute caused the dialog body to be announced when using a screen reader. #TINY-9816toolbar_location: 'bottom'. #TINY-9718detailselement resulted in broken markup. #TINY-9884contenteditable="false"attribute. #TINY-9823detailselements. #TINY-9885v6.4.2Compare Source
Fixed
urlinputdialog component would not open the type-ahead dropdown when the input value was reset to an empty string. #TINY-9717tox-buttonandtox-button-secondarybuttons now support thehover,active,focus, anddisabledstates. #TINY-9713fontsizeinputchanged it to the default value instead of reverting it to the previous, and valid, value. #TINY-9754selection.scrollIntoViewAPI. #TINY-9747quickimagetoolbar button failed to insert images selected from the local computer when running on Google Chrome for macOS. #TINY-9769v6.4.1Compare Source
Fixed
fontsizeinputincrease and decrease size buttons now work on TinyMCE mobile. #TINY-9725v6.4.0Compare Source
Added
treecomponent that can be used in dialog body panel. #TINY-9532renderUIproperty in theThemetype can now return aPromise<RenderResult>instead ofRenderResult. #TINY-9556isEditableAPI toeditor.selectionthat returns true or false if the current selection is editable. #TINY-9462isEditableAPI toeditor.domthat returns true or false if the specified node is editable. #TINY-9462setTextandsetIconmethods added to menu button and toolbar button API. #TINY-9268highlight_on_focusoption which enables highlighting the content area on focus. #TINY-9277fontsizeinputtoolbar item which allows the user to set the size via input and also increase and decrease it with+and-buttons. #TINY-9429skipFocusoption to theToggleToolbarDrawercommand to preserve focus. #TINY-9337font_size_input_default_unitoption allows entry of numbers without a unit infontsizeinput. They are then parsed as the set unit. Iffont_size_input_default_unitis not set the default ispt. #TINY-9585groupandtogglebuttonin view. #TINY-9523togglebuttonin dialog footer buttons. #TINY-9523toggleFullscreento dialog API. #TINY-9528text-size-increaseandtext-size-decreaseicons. #TINY-9530xss_sanitizationoption to allow disabling of XSS sanitization. #TINY-9600ui_modeoption for editor in scrollable containers support. #TINY-9414regionwhen visible and the accessibility rolepresentationwhen hidden. #TINY-9517tox-custom-editorclass now has a border highlight when it is selected. #TINY-9673contenteditable="false"attribute. #TINY-9364Improved
inputfontsizeinput field now moves focus back into the editor content. #TINY-9598contenteditable="false"attribute now includes target element details. #TINY-9599Changed
linkplugins context menu items no longer appears for links that include elements with acontenteditable="false"attribute. #TINY-9491contenteditable="false"attribute are no longer cloned to new cells when new table rows are created. #TINY-9449@dialog-table-border-color, and added right padding to the first cell of dialog table. #TINY-9380Fixed
searchreplacemodal closed incorrectly when clicking outside of the alert that pops up when no match is found. #TINY-9443onSetupapi function would not run when defining custom group toolbar button. #TINY-9496setIconFillfunction toNestedMenuItemInstanceApi. #TINY-9497advlistplugin now show the correct state when the cursor is in a checklist. #TINY-5167editor.insertContentAPI would insert contents inside elements with acontenteditable="false"attribute if the selection was inside the element. #TINY-9462contenteditable="false"attribute. #TINY-9305contenteditable="false"attribute was possible if they were within an element with acontenteditable="false"attribute. #TINY-9473contenteditable="false"attribute. #TINY-9474contenteditable="false"attribute as their root were incorrectly editable using list API commands, toolbar buttons and menu items. #TINY-9458#character. #TINY-9457contenteditable="false"attribute. #TINY-9459contenteditable="false"attribute. #TINY-9459contenteditable="false"attribute and for tables within an element with acontenteditable="false"attribute. #TINY-9459contenteditable="false"attribute. #TINY-9470contenteditable="false"attribute. #TINY-9471onActioncallback. #TINY-9504ForwardDeleteandDeleteeditor commands were deleting content within elements with acontenteditable="false"attribute. #TINY-9477contenteditable="false"attribute. #TINY-9477contenteditable="false"attribute root would sometimes try to split the editable element. #TINY-9461contenteditable="false"attribute on table borders would remove the element on drop. #TINY-9021contenteditable="false"attribute would be removed when dragged and dropped within a root element with acontenteditable="false"attribute. #TINY-9558contenteditable="false"attribute that were inside an element with acontenteditable="false"attribute. #TINY-9563fixedorabsolutepositioned element. #TINY-9554color_colsoption was not respected in theforecolororbackcolorcolor swatches. #TINY-9560contenteditable="false"attribute out of its parent block would not properly pad the parent block element. #TINY-9606text_patternsproduced an invisible space before a word. #TINY-9603color_colsor other column option was set to 0. #TINY-9649more...toolbar button disappeared if the editor hadtoolbar_mode: 'sliding'and the toolbar was opened. #TINY-9419autoresizeplugin would cause infinite resizing whencontent_csswas set todocument. #TINY-8872v6.3.2Compare Source
Fixed
v6.3.1Compare Source
Fixed
WindowManager.alertandWindowManager.confirmAPIs were not properly sanitized. #TINY-3548v6.3.0Compare Source
Added
expandfunction added totinymce.selectionwhich expands the selection around the nearest word. #TINY-9001expandfunction added totinymce.dom.RangeUtilsto return a new range expanded around the nearest word. #TINY-9001color_map_backgroundandcolor_map_foregroundoptions which set the base colors used in thebackcolorandforecolortoolbar buttons and menu items. #TINY-9184storageKeyproperty tocolorinputcomponent andcolorswatchfancy menu item. #TINY-9184addViewfunction added toeditor.ui.registrywhich makes it possible to register custom editor views. #TINY-9210ToggleViewcommand which makes it possible to hide or show registered custom views. #TINY-9210color_default_foregroundandcolor_default_backgroundoptions to set the initial default color for theforecolorandbackcolortoolbar buttons and menu items. #TINY-9183getTransparentElementsfunction added totinymce.html.Schemato return a map object of transparent HTML elements. #TINY-9172ToggleToolbarDrawerevent to subscribe to toolbar’s opening and closing. #TINY-9271Changed
setContentis now allowed to accept any custom keys and values as a second options argument. #TINY-9143Improved
Fixed
getContentAPI. #TINY-9186tinymce-5skin. #TINY-9108editor.selection.getContent({ format: 'text' })oreditor.getContent({ format: 'text' })would sometimes deselect selected radio buttons. #TINY-9213quickbarsplugin showed when the cursor was in a fake block caret. #TINY-9190editor.selection.getRng()API was not returning a proper range on hidden eConfiguration
📅 Schedule: Branch creation - "" in timezone America/New_York, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.