GHSA-w67g-2h6v-vjgq Phlex XSS protection bypass via attribute splatting, dynamic tags, and href values

Not scored Published

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.

  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:

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.

PackageAffectedFixed in
phlex RubyGemsAll versions1.11.1
phlex RubyGemsAll versions1.11.1
phlex RubyGemsFrom 2.0.0.beta12.0.2
phlex RubyGemsFrom 2.0.0.beta12.0.2
phlex RubyGemsFrom 2.1.02.1.3
phlex RubyGemsFrom 2.1.02.1.3
6 more packages
phlex RubyGemsFrom 2.2.02.2.2
phlex RubyGemsFrom 2.2.02.2.2
phlex RubyGemsFrom 2.3.02.3.2
phlex RubyGemsFrom 2.3.02.3.2
phlex RubyGemsFrom 2.4.0.beta12.4.1
phlex RubyGemsFrom 2.4.0.beta12.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.

Sources

Is GHSA-w67g-2h6v-vjgq in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free