Loading advisory.
Loading advisory.
Phlex vulnerable to Cross-site Scripting (XSS) via maliciously formed HTML attribute names and values
There is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data.
Published 2024-04-30 22:25 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| phlex | RubyGems | < 1.9.3 >= 1.10.0, < 1.10.2 versions 0.1.0, 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 1.0.0, 1.0.0.rc1, 1.0.0.rc2, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1 and 28 more | 1.9.3, 1.10.2 | gem install phlex -v 1.9.3gem install phlex -v 1.10.2 |
There is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data.
The reason these issues were not detected before is the escapes were working as designed. However, their design didn't take into account just how recklessly permissive browser are when it comes to executing unsafe JavaScript via HTML attributes.
If you render an <a> tag with an href attribute set to a user-provided link, that link could potentially execute JavaScript when clicked by another user.
a(href: user_profile) { "Profile" }If you splat user-provided attributes when rendering any HTML or SVG tag, malicious event attributes could be included in the output, executing JavaScript when the events are triggered by another user.
h1(**JSON.parse(user_attributes))Patches are available on RubyGems for all minor versions released in the last year.
If you are on main, it has been patched since da8f943
Configuring a Content Security Policy that does not allow unsafe-inline would effectively prevent this vulnerability from being exploited.
In addition to upgrading to a patched version of Phlex, we strongly recommend configuring a Content Security Policy header that does not allow unsafe-inline. Here’s how you can configure a Content Security Policy header in Rails. https://guides.rubyonrails.org/security.html#content-security-policy-header
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.007 on 2026-11-24 to 0.009 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.007 | first score | v2026.06.15 |
| 2026-11-26 | 0.009 | 0.007 | v2026.06.15 |