Every CVE Search/ Get API key

CVE-2024-28199

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

7.1 HighFix available

phlex is an open source framework for building object-oriented views in Ruby. 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. 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. If you splat user-provided attributes when rendering any HTML tag, malicious event attributes could be included in the output, executing JavaScript when the events are triggered by another user. Patches are available on RubyGems for all 1.x minor versions. Users are advised to upgrade. Users unable to upgrade should consider configuring a content security policy that does not allow unsafe-inline.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
Low
Availability
None

Exploit likelihood

0.60%Up 0.6 points since Mar 12, 2024
90%50%10%1%

What each source reports

CVE List Score used 7.1

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

phlex is an open source framework for building object-oriented views in Ruby. 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. 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. If you splat user-provided attributes when rendering any HTML tag, malicious event attributes could be included in the output, executing JavaScript when the events are triggered by another user. Patches are available on RubyGems for all 1.x minor versions. Users are advised to upgrade. Users unable to upgrade should consider configuring a content security policy that does not allow unsafe-inline.

Record
CVE-2024-28199
CVSS 3.1
7.1 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2024-0782 7.1

phlex is an open source framework for building object-oriented views in Ruby. 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. 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. If you splat user-provided attributes when rendering any HTML tag, malicious event attributes could be included in the output, executing JavaScript when the events are triggered by another user. Patches are available on RubyGems for all 1.x minor versions. Users are advised to upgrade. Users unable to upgrade should consider configuring a content security policy that does not allow unsafe-inline.

Record
EUVD-2024-0782
CVSS 3.1
7.1 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-242p-4v39-2v8g 7.1

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

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

Record
GHSA-242p-4v39-2v8g
CVSS 3.1
7.1 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
NVD 7.1

phlex is an open source framework for building object-oriented views in Ruby. 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. 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. If you splat user-provided attributes when rendering any HTML tag, malicious event attributes could be included in the output, executing JavaScript when the events are triggered by another user. Patches are available on RubyGems for all 1.x minor versions. Users are advised to upgrade. Users unable to upgrade should consider configuring a content security policy that does not allow unsafe-inline.

Record
CVE-2024-28199
CVSS 3.1
7.1 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 7.1

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

phlex is an open source framework for building object-oriented views in Ruby. 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. 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. If you splat user-provided attributes when rendering any HTML tag, malicious event attributes could be included in the output, executing JavaScript when the events are triggered by another user. Patches are available on RubyGems for all 1.x minor versions. Users are advised to upgrade. Users unable to upgrade should consider configuring a content security policy that does not allow unsafe-inline.

Record
CVE-2024-28199
CVSS 3.1
7.1 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSVGHSA-242p-4v39-2v8g 7.1

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

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

Record
GHSA-242p-4v39-2v8g
CVSS 3.1
7.1 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
phlex
RubyGems
1.9.0 to 1.9.0
1.9.1
phlex
RubyGems
1.8.0 up to 1.8.2
1.8.2
phlex
RubyGems
1.7.0 to 1.7.0
1.7.1
phlex
RubyGems
1.6.0 up to 1.6.2
1.6.2
phlex
RubyGems
1.5.0 up to 1.5.2
1.5.2
phlex
RubyGems
1.4.0 to 1.4.0
1.4.1
phlex
RubyGems
1.3.0 up to 1.3.3
1.3.3
phlex
RubyGems
1.2.0 up to 1.2.2
1.2.2
phlex
RubyGems
1.1.0 to 1.1.0
1.1.1
phlex
RubyGems
before 1.0.1
1.0.1
Show 10 moreShow less
Affected packages
PackageAffectedFixed
phlex
RubyGems
1.9.0 up to 1.9.1
1.9.1
phlex
RubyGems
1.8.0 up to 1.8.2, plus listed versions
1.8.1
1.8.2
phlex
RubyGems
1.7.0 up to 1.7.1
1.7.1
phlex
RubyGems
1.6.0 up to 1.6.2, plus listed versions
1.6.1
1.6.2
phlex
RubyGems
1.5.0 up to 1.5.2, plus listed versions
1.5.1
1.5.2
phlex
RubyGems
1.4.0 up to 1.4.1
1.4.1
phlex
RubyGems
1.3.0 up to 1.3.3, plus listed versions
1.3.11.3.2
1.3.3
phlex
RubyGems
1.2.0 up to 1.2.2, plus listed versions
1.2.1
1.2.2
phlex
RubyGems
1.1.0 up to 1.1.1
1.1.1
phlex
RubyGems
before 1.0.1, plus listed versions
0.1.00.2.00.2.10.2.20.3.0
Show 10 moreShow less
0.3.10.3.20.4.00.5.00.5.10.5.20.5.31.0.01.0.0.rc11.0.0.rc2
1.0.1

History

History
RecordedChangedSources
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-28199 is a high vulnerability (CVSS 7.1) in Phlex, published March 11, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.60%, the 49th percentile. Fixed in phlex 1.9.1.

References

MoveEnter Open