GHSA-w67g-2h6v-vjgq Phlex XSS protection bypass via attribute splatting, dynamic tags, and href values
Attackers can bypass XSS protections in Phlex via attribute splatting, dynamic tags, or href values, requiring user interaction to execute scripts.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-w67g-2h6v-vjgq?
GHSA-w67g-2h6v-vjgq is a cross-site scripting vulnerability in phlex, published on 6 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Which versions are affected by GHSA-w67g-2h6v-vjgq?
12 open source packages ship an affected version, including phlex.
| Package | Affected | Fixed in |
|---|---|---|
phlex RubyGems | All versions | 1.11.1 |
phlex RubyGems | All versions | 1.11.1 |
phlex RubyGems | From 2.0.0.beta1 | 2.0.2 |
phlex RubyGems | From 2.0.0.beta1 | 2.0.2 |
phlex RubyGems | From 2.1.0 | 2.1.3 |
phlex RubyGems | From 2.1.0 | 2.1.3 |
6 more packages
phlex RubyGems | From 2.2.0 | 2.2.2 |
phlex RubyGems | From 2.2.0 | 2.2.2 |
phlex RubyGems | From 2.3.0 | 2.3.2 |
phlex RubyGems | From 2.3.0 | 2.3.2 |
phlex RubyGems | From 2.4.0.beta1 | 2.4.1 |
phlex RubyGems | From 2.4.0.beta1 | 2.4.1 |
How do I fix GHSA-w67g-2h6v-vjgq?
Upgrade phlex to a fixed version for your release line: 1.11.1, 2.0.2, 2.1.3 or 2.2.2.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is GHSA-w67g-2h6v-vjgq being exploited?
There is no known exploitation of GHSA-w67g-2h6v-vjgq in the wild and no public exploit code.