Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-28350

CVE-2026-28350: lxml_html_clean XSS Vulnerability

CVE-2026-28350 is a cross-site scripting flaw in lxml_html_clean that allows attackers to inject base tags and hijack relative links. This article covers technical details, affected versions, impact, and mitigation.

Published: March 6, 2026

CVE-2026-28350 Overview

CVE-2026-28350 is a security vulnerability in lxml_html_clean, a Python project providing HTML cleaning functionalities originally copied from lxml.html.clean. Prior to version 0.4.4, the <base> tag passes through the default Cleaner configuration, allowing attackers to inject it and hijack relative links on the page. While the page_structure=True setting removes html, head, and title tags, there is no specific handling for <base> tags, creating a gap in the sanitization process.

Critical Impact

Attackers can inject <base> tags to hijack all relative URLs on a page, potentially redirecting users to malicious destinations and enabling phishing or credential theft attacks.

Affected Products

  • lxml_html_clean versions prior to 0.4.4
  • Applications using lxml_html_clean with default Cleaner configuration
  • Systems relying on lxml_html_clean for HTML sanitization without explicit <base> tag removal

Discovery Timeline

  • 2026-03-05 - CVE CVE-2026-28350 published to NVD
  • 2026-03-05 - Last updated in NVD database

Technical Details for CVE-2026-28350

Vulnerability Analysis

This vulnerability stems from improper output encoding for the intended context (CWE-116). The lxml_html_clean library's Cleaner class is designed to sanitize HTML content by removing potentially dangerous elements and attributes. However, the default configuration fails to account for the <base> HTML tag, which defines the base URL for all relative URLs in a document.

When an attacker injects a <base> tag with a malicious href attribute into HTML content that gets processed by the Cleaner, the tag passes through unfiltered. This causes all relative links, image sources, and other URL references on the page to resolve against the attacker-controlled base URL rather than the legitimate origin. The attack requires user interaction (clicking a link or loading resources), but once the malicious base tag is in place, all relative navigation becomes compromised.

Root Cause

The root cause is the absence of explicit handling for <base> tags in the Cleaner's default configuration. According to HTML specifications, <base> must reside within the <head> element. However, browsers may interpret misplaced <base> tags even when outside of <head>, allowing the attack to succeed even when page_structure=True removes the <head> tag itself. The Cleaner's logic did not account for this browser behavior, leaving a sanitization gap.

Attack Vector

The attack is network-based and requires no authentication. An attacker can exploit this vulnerability by submitting HTML content containing a <base> tag through any input that gets processed by the vulnerable lxml_html_clean Cleaner. When this content is rendered to users, the injected <base> tag redirects all relative URLs to an attacker-controlled domain.

The following patch was applied to address the vulnerability:

python
         if self.annoying_tags:
             remove_tags.update(('blink', 'marquee'))
 
+        # Remove <base> tags whenever <head> is being removed.
+        # According to HTML spec, <base> must be in <head>, but browsers
+        # may interpret it even when misplaced, allowing URL hijacking attacks.
+        if 'head' in kill_tags or 'head' in remove_tags:
+            kill_tags.add('base')
+
         _remove = deque()
         _kill = deque()
         for el in doc.iter():

Source: GitHub Commit

Detection Methods for CVE-2026-28350

Indicators of Compromise

  • Presence of <base> tags in sanitized HTML output where none should exist
  • User reports of being redirected to unexpected or suspicious domains
  • Web application logs showing unusual URL patterns or external domain references in relative paths
  • Anomalous outbound connections from user browsers to unknown external hosts

Detection Strategies

  • Implement content security policies (CSP) with base-uri directives to restrict allowed base URLs
  • Audit HTML output from lxml_html_clean for unexpected <base> tag presence
  • Monitor web server logs for signs of URL manipulation or unexpected redirects
  • Deploy web application firewalls (WAF) with rules to detect <base> tag injection attempts

Monitoring Recommendations

  • Enable logging for all HTML sanitization operations to track input/output patterns
  • Set up alerts for CSP violations related to base-uri restrictions
  • Implement automated scanning of rendered HTML for unauthorized <base> tags
  • Monitor user-facing applications for phishing indicators or redirect anomalies

How to Mitigate CVE-2026-28350

Immediate Actions Required

  • Upgrade lxml_html_clean to version 0.4.4 or later immediately
  • Review all applications using lxml_html_clean to ensure the updated version is deployed
  • Implement Content Security Policy headers with explicit base-uri 'self' or base-uri 'none' directives
  • Audit existing sanitized content for potentially injected <base> tags

Patch Information

The vulnerability has been patched in lxml_html_clean version 0.4.4. The fix ensures that <base> tags are automatically removed whenever the <head> tag is removed (via page_structure=True or manual configuration). This aligns with HTML specifications which require <base> to reside within <head>.

For detailed patch information, refer to the GitHub Security Advisory and the commit implementing the fix.

Workarounds

  • Manually add base to the kill_tags parameter when instantiating the Cleaner class
  • Implement post-processing to strip <base> tags from sanitized HTML output
  • Deploy CSP headers with strict base-uri directives as an additional layer of defense
bash
# Upgrade lxml_html_clean to patched version
pip install --upgrade lxml_html_clean>=0.4.4

# Verify installed version
pip show lxml_html_clean | grep Version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechLxml

  • SeverityMEDIUM

  • CVSS Score6.1

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-116
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-28348: lxml_html_clean XSS Vulnerability

  • CVE-2020-27783: Lxml Python Library XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English