Highlight Js syntax highlighter
The module does not properly check text sent to its preview page. Anyone could use this to run unwanted scripts in the browser. This might allow them to view private details or modify existing content.
- Who could do thisAnyone visiting the site. No login needed.
- Does it apply to youAny site using this module.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this critical. Cyber Essentials expects a fix within 14 days. Do it this week.
Tell your developerUpdate Highlight Js syntax highlighter to 1.3.1.
For developers: what the fix changed
The fix decodes the JSON configuration and validates it as an array in HighlightJsPreview.php, and forces the text configuration to a string in LanguageSelect.php to prevent render array injection.
src/Controller/HighlightJsPreview.php+5 −1 fixsrc/Plugin/HighlightJs/LanguageSelect.php+4 −1 fix