Vulnerability RUSTSEC-2026-0373

Unknown
UNKNOWN RISK
Vulnerabilities without an assigned CVSS score. Severity is not determinable from available data.
1 day ago
October 16, 2026 at 12:00 PM UTC
Missing case-insensitive matching for CSS url function
0.1.0 - 4.1.7 and 4.2.0 - 4.2.3
0.1.0 - 4.1.7 and 4.2.0 - 4.2.3

Summary

Missing case-insensitive matching for CSS url function

Details

URL filtering, such as relative URLs and URL scheme limits, is not always applied when CSS sanitization is used.

When the inner URL is quoted, CSS url("") is matched case-sensitively, when it should be matched case-insensitively. As a result, while url("") gets the intended domain name filtering, URL("") does not.

The following example shows how an application needs to be configured to trigger this bug.

let mut builder = Builder::new();
// allow inline styles
builder.filter_style_properties(hashset!["background-image"]);
builder.add_generic_attributes(&["style"]);
// notice that "http" URLs aren't allowed
builder.url_schemes(["cid"].into());

// attacker-controlled, presumably
let cleaned = builder.clean(r#"<div style='background:URL("https://evil.com/ping");'>"#);

// this is the expected result
assert_eq!(String::from(&cleaned), r#"<div style="">ok</p>"#);

// this is the result that the vulnerable version actually gets
assert_eq!(String::from(&cleaned), r#"<div style="background-image:URL(&quot;https://evil.com/ping&quot;);">ok</p>"#);

This can be used to inject tracking pixels where the application intended to prevent them. It does not allow XSS, and its usefulness for data exfiltration is limited.

Impacted packages

Timeline

Published
1 day ago
October 16, 2026 at 12:00 PM UTC
Fixed (4.1.8)
15 hours ago
October 17, 2026 at 03:45 AM UTC
Fixed (4.2.4)
15 hours ago
October 17, 2026 at 03:45 AM UTC
Last Modified
4 hours ago
October 17, 2026 at 03:30 PM UTC