GHSA-w67g-2h6v-vjgq
HIGHPhlex XSS protection bypass via attribute splatting, dynamic tags, and href values
Blast Radius
phlex💎phlex💎phlex💎phlex💎phlex💎phlexReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | phlex | ≥ 2.4.0.beta1&&< 2.4.1 | 2.4.1 |
| 💎RubyGems | phlex | ≥ 2.3.0&&< 2.3.2 | 2.3.2 |
| 💎RubyGems | phlex | ≥ 2.2.0&&< 2.2.2 | 2.2.2 |
| 💎RubyGems | phlex | ≥ 2.1.0&&< 2.1.3 | 2.1.3 |
| 💎RubyGems | phlex | ≥ 2.0.0.beta1&&< 2.0.2 | 2.0.2 |
| 💎RubyGems | phlex | all versions | 1.11.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phlex. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update phlex to 2.4.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-w67g-2h6v-vjgq is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-w67g-2h6v-vjgq is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-w67g-2h6v-vjgq. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-w67g-2h6v-vjgq in your dependencies?
O3 detects GHSA-w67g-2h6v-vjgq across RubyGems dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.