Skip to content

← Public intelligence

Packagist package

rhukster/dom-sanitizer

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 4.7PackagistPublished

    rhukster/dom-sanitizer: SVG tag allows CSS injection via unfiltered url() and @import directives

    CVE-2026-40301 · GHSA-93vf-569f-22cq

    Affected
    • Packagist rhukster/dom-sanitizer < 1.0.10
    Fixed in
    1.0.10· Vendor fix available
    Issue
    DOMSanitizer::sanitize() allows <style elements in SVG content but never inspects their text content. CSS url() references and @import rules pass through unfiltered, causing the browser to issue HTTP requests to attacker-controlled hosts when the sanitized SVG is rendered. Details In src/DOMSanitizer.php, 'style' is listed in the SVG allowed-tag array (line 31). The sanitize() method (lines 111–133) removes disallowed tags and strips attributes matching the EXTERNALURL pattern — but text node content of <style elements is never examined. Because CSS rules live in text nodes, EXTERNALURL filtering never applies to them. Vulnerable code (src/DOMSanitizer.php, line 31): The following payload survives sanitize() intact: PoC Render the returned string in a browser. The browser sends a GET request to https://attacker.example/collect. Impact Any application that passes user-controlled SVG through DOMSanitizer::sanitize() and renders the output in a browser is vulnerable. An attacker…

    Recommended action: Upgrade to 1.0.10 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 6.1PackagistPublished

    Cross-site Scripting in DOMSanitizer

    CVE-2023-49146 · GHSA-2ghm-r75j-pjx2

    Affected
    • Packagist rhukster/dom-sanitizer < 1.0.7
    Fixed in
    1.0.7· Vendor fix available
    Issue
    DOMSanitizer (aka dom-sanitizer) before 1.0.7 allows XSS via an SVG document because of mishandling of comments and greedy regular expressions.

    Recommended action: Upgrade to 1.0.7 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →