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

High 7.1 Published Updated

An XSS vulnerability in the Phlex Ruby framework allows attackers to execute scripts via bypassed href sanitization, requiring an upgrade to patched versions.

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 CVE-2024-32463?

CVE-2024-32463 is a high-severity cross-site scripting vulnerability in phlex-ruby phlex, published on 17 Apr 2024. 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

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. The filter to detect and prevent the use of the `javascript:` URL scheme in the `href` attribute of an `<a>` tag could be bypassed with tab `\t` or newline `\n` characters between the characters of the protocol, e.g. `java\tscript:`. This vulnerability is fixed in 1.10.1, 1.9.2, 1.8.3, 1.7.2, 1.6.3, 1.5.3, and 1.4.2. Configuring a Content Security Policy that does not allow `unsafe-inline` would effectively prevent this vulnerability from being exploited.

Weakness: CWE-79

Which versions are affected by CVE-2024-32463?

14 open source packages ship an affected version, including phlex.

PackageAffectedFixed in
phlex RubyGemsAll versions1.4.2
phlex RubyGemsAll versions1.4.2
phlex RubyGemsFrom 1.10.01.10.1
phlex RubyGemsFrom 1.10.01.10.1
phlex RubyGemsFrom 1.5.01.5.3
phlex RubyGemsFrom 1.5.01.5.3
8 more packages
phlex RubyGemsFrom 1.6.01.6.3
phlex RubyGemsFrom 1.6.01.6.3
phlex RubyGemsFrom 1.7.01.7.2
phlex RubyGemsFrom 1.7.01.7.2
phlex RubyGemsFrom 1.8.01.8.3
phlex RubyGemsFrom 1.8.01.8.3
phlex RubyGemsFrom 1.9.01.9.2
phlex RubyGemsFrom 1.9.01.9.2

How do I fix CVE-2024-32463?

Upgrade phlex to a fixed version for your release line: 1.4.2, 1.10.1, 1.5.3 or 1.6.3.

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 CVE-2024-32463 being exploited?

There is no known exploitation of CVE-2024-32463 in the wild and no public exploit code.

Sources

Also known as GHSA-g7xq-xv8c-h98c.

Is CVE-2024-32463 in your software?

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

Check your SBOMs for free