{"answers":{"affected":"20 open source packages ship an affected version, including phlex. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-28199 in the wild and no public exploit code.","fix":"Upgrade phlex to a fixed version for your release line: 1.0.1, 1.1.1, 1.2.2 or 1.3.3.","what":"CVE-2024-28199 is a high-severity cross-site scripting vulnerability in phlex-ruby phlex, published on 11 Mar 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-28199 and fix it if it is affected.\n\nWhat it is: CVE-2024-28199 is a high-severity cross-site scripting vulnerability in phlex-ruby phlex, published on 11 Mar 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-28199 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- phlex (RubyGems): affected all versions; fixed in 1.0.1\n- phlex (RubyGems): affected all versions; fixed in 1.0.1\n- phlex (RubyGems): affected from 1.1.0; fixed in 1.1.1\n- phlex (RubyGems): affected from 1.1.0; fixed in 1.1.1\n- phlex (RubyGems): affected from 1.2.0; fixed in 1.2.2\n- phlex (RubyGems): affected from 1.2.0; fixed in 1.2.2\n- phlex (RubyGems): affected from 1.3.0; fixed in 1.3.3\n- phlex (RubyGems): affected from 1.3.0; fixed in 1.3.3\n- phlex (RubyGems): affected from 1.4.0; fixed in 1.4.1\n- phlex (RubyGems): affected from 1.4.0; fixed in 1.4.1\n- phlex (RubyGems): affected from 1.5.0; fixed in 1.5.2\n- phlex (RubyGems): affected from 1.5.0; fixed in 1.5.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-28199/ (Markdown: https://insights.sbomify.com/CVE-2024-28199/index.md)","id":"CVE-2024-28199","markdown":"https://insights.sbomify.com/CVE-2024-28199/index.md","name":"CVE-2024-28199","record":{"aliases":["GHSA-242p-4v39-2v8g"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby view framework","requires_auth":"none","summary":"Attackers can execute JavaScript via malicious HTML attributes in Phlex views, requiring users to upgrade the Ruby library.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"phlex","vendor":"phlex"}],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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. This was due to improper case-sensitivity in the code that was meant to prevent these attacks. If you render an `\u003ca\u003e` 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`.","ecosystems":["RubyGems"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex","id":"CVE-2024-28199","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":20,"n_references":4,"next":{"headline":"N-central Authentication Bypass","id":"CVE-2024-28200"},"packages":[{"ecosystem":"RubyGems","fixed":["1.0.1"],"introduced":["0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.0.1"],"introduced":["0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.1.1"],"introduced":["1.1.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.1.1"],"introduced":["1.1.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.2.2"],"introduced":["1.2.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.2.2"],"introduced":["1.2.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.3.3"],"introduced":["1.3.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.3.3"],"introduced":["1.3.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.4.1"],"introduced":["1.4.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.4.1"],"introduced":["1.4.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.5.2"],"introduced":["1.5.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.5.2"],"introduced":["1.5.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.6.2"],"introduced":["1.6.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.6.2"],"introduced":["1.6.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.7.1"],"introduced":["1.7.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.7.1"],"introduced":["1.7.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.8.2"],"introduced":["1.8.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.8.2"],"introduced":["1.8.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.9.1"],"introduced":["1.9.0"],"last_affected":[],"package":"phlex","purl":null,"source":"GHSA-242p-4v39-2v8g"},{"ecosystem":"RubyGems","fixed":["1.9.1"],"introduced":["1.9.0"],"last_affected":[],"package":"phlex","purl":"pkg:gem/phlex","source":"GHSA-242p-4v39-2v8g"}],"prev":{"headline":"XML external entity (XXE) injection in OpenOLAT","id":"CVE-2024-28198"},"products":["phlex"],"published":"2024-03-11","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["phlex-ruby"]},"summary":"Attackers can execute JavaScript via malicious HTML attributes in Phlex views, requiring users to upgrade the Ruby library.","url":"https://insights.sbomify.com/CVE-2024-28199/"}