Repository navigation
Security
-
CSS properties that contain an image function like
image-set()orimage()are now removed if the image function contains a disallowed URL or a substitution function likevar()at any depth. Previously, a value likeimage-set(var(--x, "http://example.com/a.png") 1x)could be used to load an image from a URL that the:protocolsallowlist didn't allow. (GHSA-c48c-gjq9-vcq5) -
URLs in CSS
src()functions are now validated against the:protocolsallowlist just like URLs inurl()functions, and CSS properties that contain asrc()function with a disallowed URL or with anything other than a single string are removed. No browsers currently supportsrc(), 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