Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: OSV

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-28199
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 23:24 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 11 Mar 2024, 22:50 UTC

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

osv:CVE-2024-28199
Complete source record
{
  "id": "0237c119165bdf69e558e32f2b84edb40d21c0b4b10db1410bb1ead3e6e989c4",
  "url": "https://osv.dev/vulnerability/CVE-2024-28199",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex",
    "summary": "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 `` 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`.",
    "evidence": "osv:CVE-2024-28199",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-28199",
      "aliases": [
        "CVE-2024-28199",
        "GHSA-242p-4v39-2v8g"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/yippee-fun/phlex",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "4df8d18dda5ed64122f94825bae8abf447e63367"
                },
                {
                  "introduced": "afa5451028e20049f6a75b72aa218fd0a63e5d93"
                },
                {
                  "fixed": "fae7e25662f4345070a27e0bda726a819ad15e30"
                },
                {
                  "introduced": "fa810da8d48813ddb5e1d5a9ae020f31c50a0e63"
                },
                {
                  "fixed": "9ded35a380c43b8bef712a5f39548c0ef5360aab"
                },
                {
                  "introduced": "78a2deff1d96b24aeb908618804970c520a0feb2"
                },
                {
                  "fixed": "aa50c604cdee1d0ce7ef068a4c66cbd5d43f96a1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:phlex:phlex:*:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.0.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:phlex:phlex:*:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "1.2.0"
                      },
                      {
                        "fixed": "1.2.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:phlex:phlex:*:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "1.3.0"
                      },
                      {
                        "fixed": "1.3.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:phlex:phlex:1.1.0:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "1.1.0"
                      },
                      {
                        "last_affected": "1.1.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:phlex:phlex:1.4.0:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "1.4.0"
                      },
                      {
                        "last_affected": "1.4.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:phlex:phlex:1.7.0:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "1.7.0"
                      },
                      {
                        "last_affected": "1.7.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:phlex:phlex:1.9.0:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "1.9.0"
                      },
                      {
                        "last_affected": "1.9.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "aa50c604cdee1d0ce7ef068a4c66cbd5d43f96a1"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.1.0",
            "1.4.0",
            "1.7.0",
            "1.9.0",
            "= 1.1.0",
            "= 1.4.0",
            "= 1.7.0",
            "= 1.9.0",
            "1.0.0",
            "1.2.1",
            "1.3.2",
            "1.5.1",
            "1.6.1",
            "1.8.1",
            "1.8.0",
            "1.6.0",
            "1.5.0",
            "1.3.1",
            "1.3.0",
            "1.2.0",
            "1.0.0.rc2",
            "1.0.0.rc1",
            "0.5.3",
            "0.5.2",
            "0.5.1",
            "0.5.0",
            "0.4.0",
            "0.3.2",
            "0.3.1",
            "0.3.0",
            "0.2.2",
            "0.2.1",
            "0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-28199.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:24.295676327Z",
      "provider": "osv",
      "references": [
        "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",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/28xxx/CVE-2024-28199.json",
        "https://github.com/phlex-ruby/phlex/security/advisories/GHSA-242p-4v39-2v8g",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-28199",
        "https://github.com/phlex-ruby/phlex/commit/aa50c604cdee1d0ce7ef068a4c66cbd5d43f96a1"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/28xxx/CVE-2024-28199.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-28199",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 490871,
  "published_at": "2024-03-11T22:50:38.789+00:00"
}