GHSA-w67g-2h6v-vjgq: Phlex XSS protection bypass via attribute splatting, dynamic tags, and href values
Impact During a security audit conducted with Claude Opus 4.6 and GPT-5.3-Codex, we identified three specific ways to bypass the XSS (cross-site-scripting) protection built into Phlex. 1. The first bypass could happen if user-provided attributes with string keys were splatted into HTML tag, e.g. div(userattributes). 2. The second bypass could happen if user-provided tag names were passed to the tag method, e.g.
Published Feb 6, 2026
Affected packages
phlex
- Ecosystem
- RubyGems
- Affected
- >= 2.4.0.beta1, < 2.4.1
- Fixed in
- 2.4.1
- Check
bundle info phlex
phlex
- Ecosystem
- RubyGems
- Affected
- >= 2.3.0, < 2.3.2
- Fixed in
- 2.3.2
- Check
bundle info phlex
phlex
- Ecosystem
- RubyGems
- Affected
- >= 2.2.0, < 2.2.2
- Fixed in
- 2.2.2
- Check
bundle info phlex
phlex
- Ecosystem
- RubyGems
- Affected
- >= 2.1.0, < 2.1.3
- Fixed in
- 2.1.3
- Check
bundle info phlex
phlex
- Ecosystem
- RubyGems
- Affected
- >= 2.0.0.beta1, < 2.0.2
- Fixed in
- 2.0.2
- Check
bundle info phlex
phlex
- Ecosystem
- RubyGems
- Affected
- < 1.11.1
- Fixed in
- 1.11.1
- Check
bundle info phlex
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
During a security audit conducted with Claude Opus 4.6 and GPT-5.3-Codex, we identified three specific ways to bypass the XSS (cross-site-scripting) protection built into Phlex.
- The first bypass could happen if user-provided attributes with string keys were splatted into HTML tag, e.g.
div(**user_attributes). - The second bypass could happen if user-provided tag names were passed to the
tagmethod, e.g.tag(some_tag_name_from_user). - The third bypass could happen if user’s links were passed to
hrefattributes, e.g.a(href: user_provided_link).
All three of these patterns are meant to be safe and all have now been patched.
Patches
Phlex has patched all three issues and introduced new tests that run against Safari, Firefox and Chrome.
The patched versions are:
Phlex has also patched the `main` branch in GitHub.
Workarounds
If a project uses a secure CSP (content security policy) or if the application doesn’t use any of the above patterns, it is not at risk.
References
- https://github.com/yippee-fun/phlex/security/advisories/GHSA-w67g-2h6v-vjgq
- https://github.com/yippee-fun/phlex/commit/1d85da417cb15eb8cb2f54a68d531c9b35d9d03a
- https://github.com/yippee-fun/phlex/commit/556441d5a64ff93f749e8116a05b2d97264468ee
- https://github.com/yippee-fun/phlex/commit/74e3d8610ffabc2cf5f241945e9df4b14dceb97d
- https://github.com/yippee-fun/phlex/commit/9f56ad13bea9a7d6117fdfd510446c890709eeac
- https://github.com/yippee-fun/phlex/commit/fe9ea708672f9fa42526d9b47e1cdc4634860ef1
- https://github.com/advisories/GHSA-w67g-2h6v-vjgq
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More RubyGems vulnerabilities
All RubyGems entriesCVE-2024-32970
Phlex vulnerable to Cross-site Scripting (XSS) via maliciously formed HTML attribute names and values
high7.1May 1, 2024CVE-2024-32463
Cross-site Scripting (XSS) possible due to improper sanitisation of `href` attributes on `<a>` tags
high7.1Apr 17, 2024CVE-2024-28199
Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex
high7.1Mar 12, 2024
