Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsTraining
StudyProjectsNewsletterHire MeAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Training
Study
Projects
Newsletter
Hire Me
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

1451+ Articles
151+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Checklists
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-44990: sanitize-html XMP Element XSS Bypass (CVSS 9.3)
CVE-2026-44990: sanitize-html XMP Element XSS Bypass (CVSS 9.3)

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2026-44990

CVE-2026-44990: sanitize-html XMP Element XSS Bypass (CVSS 9.3)

sanitize-html versions prior to 2.17.4 allow attacker-controlled content inside a disallowed xmp element to render as live HTML, enabling stored XSS.

Dylan H.

Security Team

June 13, 2026
4 min read

Affected Products

  • sanitize-html < 2.17.4
  • ApostropheCMS

Overview

A critical cross-site scripting (XSS) vulnerability has been disclosed in sanitize-html, the widely used Node.js HTML sanitization library. Tracked as CVE-2026-44990 with a CVSS score of 9.3, the flaw allows attacker-controlled content inside a disallowed xmp element to escape sanitization and render as live HTML in the browser.

The vulnerability affects all versions of sanitize-html prior to 2.17.4 and is particularly impactful for applications built on ApostropheCMS, which depends on sanitize-html for content sanitization.

Technical Details

The xmp element is an obsolete HTML tag originally designed to display raw, preformatted text without processing HTML entities or tags. Modern browsers still parse the xmp element but handle its content in a parser-dependent manner.

When sanitize-html is configured to disallow the xmp tag (which is the default for most configurations), the library strips the xmp opening and closing tags but does not properly escape the raw content within them before outputting it. This means that HTML markup embedded inside an xmp element by an attacker passes through the sanitizer as literal text—which browsers then interpret and render as active HTML.

Attack scenario:

An attacker who can inject HTML into a field sanitized by the affected library (e.g., a comment field, rich-text editor, or user bio) can submit content such as:

<xmp><script>alert(document.cookie)</script></xmp>

After sanitization with a vulnerable version, the output becomes:

<script>alert(document.cookie)</script>

This executes in the victim's browser context, enabling session hijacking, credential theft, or malicious redirects.

Affected Versions

PackageAffected VersionsFixed Version
sanitize-html< 2.17.42.17.4
ApostropheCMSVersions depending on sanitize-html < 2.17.4Update sanitize-html dependency

CVSS Score

MetricValue
Score9.3 (Critical)
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionRequired
ConfidentialityHigh
IntegrityHigh
AvailabilityNone

Impact

Successful exploitation enables:

  • Stored XSS in any application that stores and re-renders user-supplied content sanitized by the affected library
  • Session hijacking via cookie theft if the HttpOnly flag is not set
  • Credential harvesting through phishing overlays injected into legitimate pages
  • Account takeover in CMS environments where editors and admins view user-submitted content
  • Malware distribution via injected script tags that redirect users to attacker-controlled payloads

Applications processing user-generated content—such as blog comments, forum posts, or rich text fields—are particularly at risk.

Remediation

Immediate Actions

  1. Update sanitize-html to version 2.17.4 or later:
npm update sanitize-html
# or explicitly
npm install sanitize-html@2.17.4
  1. Verify your package-lock.json or yarn.lock reflects the updated version.

  2. ApostropheCMS users should update the sanitize-html dependency in their project and confirm the CMS itself has published an updated release that pins to 2.17.4+.

Verify Installed Version

npm list sanitize-html

Ensure the resolved version is 2.17.4 or higher. If transitive dependencies resolve an older version, use npm overrides to force the patched version:

{
  "overrides": {
    "sanitize-html": "^2.17.4"
  }
}

Workaround (If Patching is Delayed)

Add xmp to the list of explicitly disallowed tags with aggressive stripping, and add a post-processing step to escape any remaining raw HTML entities. However, this is not a guaranteed mitigation—updating to the fixed version is strongly recommended.

Detection

Review your application logs for xmp tags appearing in submitted user content. Audit stored content in your database for any existing payloads using this vector. Search for <xmp in user-generated HTML fields.

References

  • NVD: CVE-2026-44990
  • sanitize-html npm package
  • ApostropheCMS Security Advisories
#CVE#XSS#Node.js#sanitize-html#ApostropheCMS#Vulnerability

Related Articles

CVE-2026-5513: Bookly WordPress Plugin Stored XSS via Cookie

The Bookly scheduling plugin for WordPress contains a stored cross-site scripting vulnerability in versions up to 27.2, allowing unauthenticated attackers...

3 min read

CVE-2026-5324: WordPress Brizy Page Builder Unauthenticated

The Brizy Page Builder plugin for WordPress contains a critical unauthenticated Stored Cross-Site Scripting flaw in versions up to 2.8.11, enabling...

3 min read

CVE-2026-40322: SiYuan XSS via Mermaid innerHTML Injection

SiYuan knowledge management versions 3.6.3 and below render Mermaid diagrams with loose security, allowing attacker-controlled javascript: URLs to execute...

3 min read
Back to all Security Alerts