Incorrect escaping for `url("")` functions in CSS style attributes
Exact source revision recorded 24 Oct 2026 13:19:54 UTC. It does not establish the source's current position. Latest evidence.
osv · RUSTSEC-2021-0157
PublishedIn some cases, quotation marks in CSS url() functions are not escaped. This allows CSS injection. This feature is not enabled by default, so an application is vulnerable if, and only if, the style attribute is allowed and filter_style_properties is used. As an example, this snippet: ```html <div style='background:url("cid:\");EVIL_CSS_HERE;background:url(\"cid:")'> ``` Would erroneously "sanitize" to: ```html <div style='background:url("cid:");EVIL_CSS_HERE;background:url("cid:")'> ``` --- This vulnerability was reported by Uttej Badwane
- Source published
- 10 Oct 2021 12:00:00 UTC
- Source modified
- 12 Oct 2026 18:15:01 UTC
- Observed here
- 24 Oct 2026 13:19:54 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · OSV · upstream source license applies. Source text is retained; field grouping and change labels are provided by ChangeIntel.