Smart Trim
The module does not properly clean unsafe code when text passes through its custom template filter. Someone with an ordinary account could run harmful code in the browser of other visitors. They could read hidden data and change information on the site.
- Who could do thisOnly someone with a login on your site.
- Does it apply to youA site is affected if an attacker has an access right to post content that passes through a template using one of the filters provided by this module.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.
Tell your developerUpdate Smart Trim to 2.3.2 or 2.2.2, whichever branch you are on.
For developers: what the fix changed
The fix adds a smartTrimFilterOrEscape method in src/SmartTrimTwigExtension.php to escape untrusted input using Html::escape when HTML stripping is disabled, and updates smartTrimChars and smartTrimWords to use this new method.
src/SmartTrimTwigExtension.php+38 −10 fix