symfony/html-sanitizer is vulnerable to Incomplete List of Disallowed Inputs
20
CVE Score
Low
Incomplete List of Disallowed Inputs
Before the fix, UrlAttributeSanitizer did not list srcset or imagesrcset among its supported attributes, so DomVisitor kept an allowed attribute value verbatim when no sanitizer handled it. Anyone whose HTML the application sanitizes could keep responsive-image URL lists pointing at hosts or schemes barred by allowMediaHosts(), allowMediaSchemes() or forceHttpsUrls(), while the same policy dropped the matching src. This requires a configuration that permits these attributes, such as allowSafeElements(), allowStaticElements() or an explicit allowElement() or allowAttribute() call. The fix registers both attributes and checks each srcset candidate against the media scheme, host and HTTPS policy, dropping rejected candidates and the attribute when none survive.
Upgrade the symfony/html-sanitizer package to a fixed release on your branch: 6.4.50, 7.4.23, 8.1.11.
You are affected if you are using a version that falls within the vulnerable range and sanitize HTML supplied by people you do not fully trust while allowing srcset or imagesrcset and relying on media host or scheme restrictions.
6.1.0 - 6.4.49
Fixed in 6.4.507.0.0 - 7.4.22
Fixed in 7.4.238.0.0 - 8.1.10
Fixed in 8.1.11symfony/html-sanitizer is vulnerable to Incomplete List of Disallowed Inputs in versions 6.1.0 - 6.4.49, 7.0.0 - 7.4.22 and 8.0.0 - 8.1.10.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.