Skip to content

← Public intelligence

RubyGems package

phlex

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

4 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 7.1RubyGemsPublished

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

    GHSA-w67g-2h6v-vjgq

    Affected
    • RubyGems phlex >= 2.4.0.beta1, < 2.4.1; >= 2.3.0, < 2.3.2; >= 2.2.0, < 2.2.2; >= 2.1.0, < 2.1.3; >= 2.0.0.beta1, < 2.0.2; < 1.11.1
    Fixed in
    2.4.12.1.32.2.22.0.21.11.12.3.2· Vendor fix available
    Issue
    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(userattributes). 2. The second bypass could happen if user-provided tag names were passed to the tag method, e.g. tag(sometagnamefromuser). 3. The third bypass could happen if user’s links were passed to href attributes, e.g. a(href: userprovidedlink). 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: - 2.4.1 - 2.3.2 - 2.2.2 - 2.1.3 - 2.0.2 - 1.11.1 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…

    Recommended action: Upgrade to 2.4.1, 2.3.2, 2.2.2 or 3 more by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. High, CVSS 7.1RubyGemsPublished

    Phlex vulnerable to Cross-site Scripting (XSS) via maliciously formed HTML attribute names and values

    CVE-2024-32970 · GHSA-9p57-h987-4vgx

    Affected
    • RubyGems phlex < 1.9.3; >= 1.10.0, < 1.10.2
    Fixed in
    1.9.31.10.2· Vendor fix available
    Issue
    There is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data. The reason these issues were not detected before is the escapes were working as designed. However, their design didn't take into account just how recklessly permissive browser are when it comes to executing unsafe JavaScript via HTML attributes. 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. 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. Patches Patches are available on RubyGems for all minor versions released in the last year. - 1.10.2 - 1.9.3 If you are on main, it has been patched since da8f943 Workarounds Configuring a Content Security Policy that does not allow unsafe-inline would effectively…

    Recommended action: Upgrade to 1.10.2 or 1.9.3 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. High, CVSS 7.1RubyGemsPublished

    Cross-site Scripting (XSS) possible due to improper sanitisation of href attributes on tags

    CVE-2024-32463 · GHSA-g7xq-xv8c-h98c

    Affected
    • RubyGems phlex >= 1.10.0, <= 1.10.0; >= 1.9.0, < 1.9.2; >= 1.8.0, < 1.8.3; >= 1.7.0, < 1.7.2; >= 1.6.0, < 1.6.3; >= 1.5.0, < 1.5.3; < 1.4.2
    Fixed in
    1.4.21.7.21.6.31.10.11.9.21.8.31.5.3· Vendor fix available
    Issue
    There is a potential cross-site scripting (XSS) vulnerability that can be exploited via maliciously crafted user data. Our 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:. 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. Mitigation The best way to mitigate this vulnerability is to update to one of the following versions: - 1.10.1 - 1.9.2 - 1.8.3 - 1.7.2 - 1.6.3 - 1.5.3 - 1.4.2 Workarounds Configuring a Content Security Policy that does not allow unsafe-inline would effectively prevent this vulnerability from being exploited.

    Recommended action: Upgrade to 1.10.1, 1.9.2, 1.8.3 or 4 more by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. High, CVSS 7.1RubyGemsPublished

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

    CVE-2024-28199 · GHSA-242p-4v39-2v8g

    Affected
    • RubyGems phlex >= 1.9.0, <= 1.9.0; >= 1.8.0, < 1.8.2; >= 1.7.0, <= 1.7.0; >= 1.6.0, < 1.6.2; >= 1.5.0, < 1.5.2; >= 1.4.0, <= 1.4.0; >= 1.3.0, < 1.3.3; >= 1.2.0, < 1.2.2; >= 1.1.0, <= 1.1.0; < 1.0.1
    Fixed in
    1.4.11.5.21.7.11.2.21.1.11.3.31.8.21.0.11.6.21.9.1· Vendor fix available
    Issue
    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. 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. Patches Patches are available on RubyGems for all 1.x minor versions. The patched versions are: - 1.9.1 - 1.8.2 - 1.7.1 - 1.6.2 - 1.5.2 - 1.4.1 - 1.3.3 - 1.2.2 - 1.1.1 - 1.0.1 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…

    Recommended action: Upgrade to 1.9.1, 1.8.2, 1.7.1 or 7 more by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →