Intel

AIKIDO-2026-758189

selma is vulnerable to Cross-Site Scripting (XSS)

GHSA-4xw4-3jxj-c23pPublished Sep 23, 2026
September 23, 2026

61

CVE Score

Medium

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

Selma streams sanitized HTML byte-for-byte and does not escape a literal < that the tokenizer classifies as text, for example in <<b>. When the sanitizer then removes an adjacent disallowed element, unknown element, or comment, the unescaped < fuses with the surrounding text and re-parses as a real tag in the browser, producing a mutation XSS that bypasses the second-pass tagfilter for tags outside its fixed list. All built-in sanitizer configurations and custom configurations are affected. The fix escapes literal < in entity-decoding text contexts so text stays text regardless of what the sanitizer removes around it.

How do I fix this?

Upgrade the selma library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Package

Versions

0.0.1 - 0.5.2

Fixed in 0.5.3

Background info

selma is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 0.5.2.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea