Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-103686 Overview
CVE-2026-103686 is a cross-site scripting (XSS) vulnerability in the rhukster/dom-sanitizer PHP library, affecting versions up to and including 1.0.15. The flaw resides in the DOMSanitizer::isDangerousUrl function within src/DOMSanitizer.php, part of the URL Validation component. Attackers can bypass URL sanitization checks and inject malicious script content that executes in a victim's browser. The vulnerability is remotely exploitable and requires only low privileges with user interaction. A public exploit has been disclosed, and the maintainers released version 1.0.16 containing patch 4623b565d060bc02ca5a07d8c8241fe28e2edfda.
Critical Impact
Successful exploitation enables script execution in the context of a trusted application, allowing session theft, UI redress, and client-side data exfiltration.
Affected Products
- rhukster/dom-sanitizer versions up to and including 1.0.15
- PHP applications integrating DOMSanitizer for HTML/URL sanitization
- Downstream projects embedding the library for user-generated content filtering
Discovery Timeline
- 2026-10-01 - CVE-2026-103686 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-103686
Vulnerability Analysis
The vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation. The DOMSanitizer::isDangerousUrl function is responsible for identifying URLs that could trigger script execution, such as javascript: or data: schemes carrying active content. When the function fails to flag a crafted URL as dangerous, the sanitizer permits the payload to pass through into rendered HTML attributes, typically href or src.
The outcome is reflected or stored XSS, depending on how the hosting application processes sanitized output. Because the sanitizer is explicitly deployed to prevent script injection, applications relying on it have no secondary layer of defense in most code paths.
Root Cause
The root cause is incomplete URL scheme validation in isDangerousUrl. Permissive parsing lets attackers obfuscate dangerous schemes using whitespace, control characters, mixed casing, or encoded variants that evade the pattern checks. The sanitizer then returns the input as safe, defeating the control.
Attack Vector
An attacker submits user-generated content containing a crafted URL into any input processed by DOMSanitizer. When the sanitized output is rendered to another user's browser, the embedded URL executes JavaScript within the application's origin. Exploitation requires network access and user interaction such as clicking the rendered link. See the GitHub Security Advisory GHSA-mrpv-6x26-mf6c and the commit fix for technical details.
Detection Methods for CVE-2026-103686
Indicators of Compromise
- Rendered HTML containing anchor or resource tags with javascript:, data:, or vbscript: URL schemes after sanitization
- Application logs showing user-submitted content with obfuscated URL schemes using encoded, whitespace-padded, or mixed-case variants
- Unexpected outbound requests from client browsers to attacker-controlled domains following page loads
Detection Strategies
- Audit application dependencies for rhukster/dom-sanitizer versions at or below 1.0.15 using composer.lock inspection
- Instrument sanitizer output in staging with payloads from the public advisory to confirm patched behavior
- Deploy Content Security Policy (CSP) violation reporting to surface inline script and non-whitelisted URI scheme executions
Monitoring Recommendations
- Monitor web server access logs for request parameters containing encoded javascript: payloads such as java%09script: or java script:
- Alert on CSP script-src and img-src violation reports originating from pages that render user-supplied HTML
- Correlate browser console errors reported through RUM telemetry with the sanitizer code path
How to Mitigate CVE-2026-103686
Immediate Actions Required
- Upgrade rhukster/dom-sanitizer to version 1.0.16 or later across all PHP applications
- Review composer.lock and transitive dependencies to confirm the patched version is loaded at runtime
- Rotate any session identifiers or tokens that may have been exposed if exploitation is suspected
Patch Information
The maintainers released version 1.0.16 containing commit 4623b565d060bc02ca5a07d8c8241fe28e2edfda. Refer to the GitHub Release v1.0.16 and the project repository for full change details.
Workarounds
- Enforce a strict Content Security Policy that blocks inline scripts and restricts script-src to trusted origins
- Add an application-layer URL scheme allowlist that rejects anything other than http:, https:, and mailto: before passing content to the sanitizer
- Escape or strip href and src attribute values server-side when rendering user-submitted HTML until the upgrade is deployed
# Configuration example
composer require rhukster/dom-sanitizer:^1.0.16
composer update rhukster/dom-sanitizer
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

