Intel

AIKIDO-2026-758189

selma is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)GHSA-4xw4-3jxj-c23p Published Yesterday

61

Medium Risk

This Affects:

RUBYselma
0.0.1 - 0.5.2
Fixed in 0.5.3
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.

Who does this affect?

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

Background info

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

How to fix this

Upgrade the selma library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform