Skip to content

v7.0.3

Latest

Choose a tag to compare

@rgrove rgrove released this 01 Dec 19:12
v7.0.3
0845b2e

Security

  • CSS properties that contain an image function like image-set() or image() are now removed if the image function contains a disallowed URL or a substitution function like var() at any depth. Previously, a value like image-set(var(--x, "http://example.com/a.png") 1x) could be used to load an image from a URL that the :protocols allowlist didn't allow. (GHSA-c48c-gjq9-vcq5)

  • URLs in CSS src() functions are now validated against the :protocols allowlist just like URLs in url() functions, and CSS properties that contain a src() function with a disallowed URL or with anything other than a single string are removed. No browsers currently support src(), so this is a defense in depth measure. (GHSA-c48c-gjq9-vcq5)

Fixed

  • Fixed a regression in 7.0.2 that could cause an infinite loop when a transformer added elements inside a removed <style>, <script>, or similar element. When Sanitize removes an element along with its contents, it now discards the contents immediately, so transformers are no longer called for them. #255

Full Changelog: v7.0.2...v7.0.3