GHSA-w67g-2h6v-vjgq — Vulnerability in phlex — Advisory Details
Phlex XSS protection bypass via attribute splatting, dynamic tags, and href values
Does your project use an affected phlex version?
Paste your Gemfile.lock to check it for GHSA-w67g-2h6v-vjgq and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published February 6, 2026 (293 days ago).
- Last revised February 6, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install phlex -v 2.3.2
gem install phlex -v 2.2.2
gem install phlex -v 2.1.3
gem install phlex -v 2.4.1
gem install phlex -v 1.11.1
gem install phlex -v 2.0.2
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (6)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| phlex RubyGems · Affected: 2.3.0, 2.3.1 | 2.3.2 |
| phlex RubyGems · Affected: 2.2.0, 2.2.1 | 2.2.2 |
| phlex RubyGems · Affected: 2.1.0, 2.1.1, 2.1.2 | 2.1.3 |
| phlex RubyGems · Affected: 2.4.0, 2.4.0.beta1, 2.4.0.beta2 | 2.4.1 |
| phlex RubyGems · Affected: 0.1.0, 0.2.0, 0.2.1, 0.2.2 (+48 more) | 1.11.1 |
| phlex RubyGems · Affected: 2.0.0, 2.0.0.beta1, 2.0.0.beta2, 2.0.0.rc1 (+2 more) | 2.0.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
References
- https://github.com/yippee-fun/phlex/security/advisories/GHSA-w67g-2h6v-vjgqWEB
- https://github.com/yippee-fun/phlex/commit/1d85da417cb15eb8cb2f54a68d531c9b35d9d03aWEB
- https://github.com/yippee-fun/phlex/commit/556441d5a64ff93f749e8116a05b2d97264468eeWEB
- https://github.com/yippee-fun/phlex/commit/74e3d8610ffabc2cf5f241945e9df4b14dceb97dWEB
- https://github.com/yippee-fun/phlex/commit/9f56ad13bea9a7d6117fdfd510446c890709eeacWEB
- https://github.com/yippee-fun/phlex/commit/fe9ea708672f9fa42526d9b47e1cdc4634860ef1WEB
- https://github.com/yippee-fun/phlexPACKAGE
Frequently Asked Questions
- What is GHSA-w67g-2h6v-vjgq?
- Phlex XSS protection bypass via attribute splatting, dynamic tags, and href values. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.1/10).
- How do I check if my project is affected by GHSA-w67g-2h6v-vjgq?
- GHSA-w67g-2h6v-vjgq affects phlex. Use GeekWala's free vulnerability scanner to check your dependencies against GHSA-w67g-2h6v-vjgq and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
Related CVEs
- CVE-2024-28199HIGH
Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex
- CVE-2026-126366HIGH
msgpack-ruby JRuby decoder makes uncapped header-count allocations; a 5-byte message forces multi-GiB OOM
- CVE-2024-32970HIGH
Phlex vulnerable to Cross-site Scripting (XSS) via maliciously formed HTML attribute names and values
- CVE-2024-32463HIGH
Cross-site Scripting (XSS) possible due to improper sanitisation of `href` attributes on `<a>` tags
- CVE-2026-126081HIGH
Action Pack: Possible Strong Parameters Bypass in Parameters#each_key