Loading...
Skip to main content

GHSA-w67g-2h6v-vjgq — Vulnerability in phlex — Advisory Details

HIGH

Phlex XSS protection bypass via attribute splatting, dynamic tags, and href values

Published February 6, 2026Updated February 6, 2026Source: osv

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. 1. The first bypass could happen if user-provided attributes with string keys were splatted into HTML tag, e.g. `div(**user_attributes)`. 2. The second bypass could happen if user-provided tag names were passed to the `tag` method, e.g. `tag(some_tag_name_from_user)`. 3. The third bypass could happen if user’s links were passed to `href` attributes, 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: - [2.4.1](https://rubygems.org/gems/phlex/versions/2.4.1) - [2.3.2](https://rubygems.org/gems/phlex/versions/2.3.2) - [2.2.2](https://rubygems.org/gems/phlex/versions/2.2.2) - [2.1.3](https://rubygems.org/gems/phlex/versions/2.1.3) - [2.0.2](https://rubygems.org/gems/phlex/versions/2.0.3) - [1.11.1](https://rubygems.org/gems/phlex/versions/1.11.1) Phlex has also patched the [`main`](https://github.com/yippee-fun/phlex) 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 (248 days ago).
  • Last revised February 6, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update phlex to 2.3.2 or later
gem install phlex -v 2.3.2
Bundler
Update phlex to 2.2.2 or later
gem install phlex -v 2.2.2
Bundler
Update phlex to 2.1.3 or later
gem install phlex -v 2.1.3
Bundler
Update phlex to 2.4.1 or later
gem install phlex -v 2.4.1
Bundler
Update phlex to 1.11.1 or later
gem install phlex -v 1.11.1
Bundler
Update phlex to 2.0.2 or later
gem install phlex -v 2.0.2

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (6)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
phlex
rubygems
2.3.0, 2.3.12.3.2
phlex
rubygems
2.2.0, 2.2.12.2.2
phlex
rubygems
2.1.0, 2.1.1, 2.1.22.1.3
phlex
rubygems
2.4.0, 2.4.0.beta1, 2.4.0.beta22.4.1
phlex
rubygems
0.1.0, 0.2.0, 0.2.1, 0.2.2 (+48 more)1.11.1
phlex
rubygems
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-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N

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

CVSS Score
7.1

High exploitability or significant impact. Prioritize remediation within days.

Related CVEs

  • CVE-2024-28199
    HIGH

    Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex

  • CVE-2026-94462
    HIGH

    Spree: Broken Access Control in `PATCH /api/v3/store/carts/:id/associate` (IDOR)

  • CVE-2024-32970
    HIGH

    Phlex vulnerable to Cross-site Scripting (XSS) via maliciously formed HTML attribute names and values

  • CVE-2024-32463
    HIGH

    Cross-site Scripting (XSS) possible due to improper sanitisation of `href` attributes on `<a>` tags

  • CVE-2026-77601
    HIGH

    OpenC3 COSMOS: Authenticated OS command injection via the `pypi_url` setting

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies