Skip to main content

CVE-2024-28199 — Vulnerability in phlex — CVE Details

HIGH

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

Published March 12, 2024Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.78%). Schedule for your next planned update.

Does your project use an affected phlex version?

Paste your Gemfile.lock to check it for CVE-2024-28199 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.

Check my Gemfile.lock

Summary

There is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data. This was due to improper case-sensitivity in the code that was meant to prevent these attacks.

Impact

If you render an <a> tag with an href attribute set to a user-provided link, that link could potentially execute JavaScript when clicked by another user.

a(href: user_profile) { "Profile" }

If you splat user-provided attributes when rendering any HTML or SVG tag, malicious event attributes could be included in the output, executing JavaScript when the events are triggered by another user.

h1(**JSON.parse(user_attributes))

Patches

Patches are available on RubyGems for all 1.x minor versions. The patched versions are:

If you are on main, it has been patched since aa50c60

Workarounds

Configuring a Content Security Policy that does not allow unsafe-inline would effectively prevent this vulnerability from being exploited.

References

In addition to upgrading to a patched version of Phlex, we strongly recommend configuring a Content Security Policy header that does not allow unsafe-inline. Here’s how you can configure a Content Security Policy header in Rails. https://guides.rubyonrails.org/security.html#content-security-policy-header

Advisory Timeline

  • First published March 12, 2024 (989 days ago).
  • Last revised September 10, 2026 — 912 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update phlex to 1.7.1 or later
gem install phlex -v 1.7.1
Bundler
Update phlex to 1.3.3 or later
gem install phlex -v 1.3.3
Bundler
Update phlex to 1.8.2 or later
gem install phlex -v 1.8.2
Bundler
Update phlex to 1.1.1 or later
gem install phlex -v 1.1.1
Bundler
Update phlex to 1.6.2 or later
gem install phlex -v 1.6.2
Bundler
Update phlex to 1.2.2 or later
gem install phlex -v 1.2.2
Bundler
Update phlex to 1.5.2 or later
gem install phlex -v 1.5.2
Bundler
Update phlex to 1.4.1 or later
gem install phlex -v 1.4.1
Bundler
Update phlex to 1.9.1 or later
gem install phlex -v 1.9.1
Bundler
Update phlex to 1.0.1 or later
gem install phlex -v 1.0.1

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (10)

Affects 1 ecosystem: RubyGems (1).

PackageFixed In
phlex RubyGems · Affected: 1.7.01.7.1
phlex RubyGems · Affected: 1.3.0, 1.3.1, 1.3.21.3.3
phlex RubyGems · Affected: 1.8.0, 1.8.11.8.2
phlex RubyGems · Affected: 1.1.01.1.1
phlex RubyGems · Affected: 1.6.0, 1.6.11.6.2
phlex RubyGems · Affected: 1.2.0, 1.2.11.2.2
phlex RubyGems · Affected: 1.5.0, 1.5.11.5.2
phlex RubyGems · Affected: 1.4.01.4.1
phlex RubyGems · Affected: 1.9.01.9.1
phlex RubyGems · Affected: 0.1.0, 0.2.0, 0.2.1, 0.2.2 (+11 more)1.0.1

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 CVE-2024-28199?
Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex. 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 CVE-2024-28199?
CVE-2024-28199 affects phlex. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-28199 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.1

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.78%
EPSS percentile: 52.4

This is an above-median EPSS score — 52.4% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-242p-4v39-2v8g

Related CVEs

  • CVE-2026-126366
    HIGH

    msgpack-ruby JRuby decoder makes uncapped header-count allocations; a 5-byte message forces multi-GiB OOM

  • 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

  • GHSA-w67g-2h6v-vjgq
    HIGH

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

  • CVE-2026-126081
    HIGH

    Action Pack: Possible Strong Parameters Bypass in Parameters#each_key

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock