{"answers":{"affected":"2 open source packages ship an affected version, including view_component. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54498 exists.","fix":"Upgrade view_component to 4.12.0 or later.","what":"CVE-2026-54498 is a high-severity cross-site scripting vulnerability in ViewComponent view_component, published on 17 Jul 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-54498 and fix it if it is affected.\n\nWhat it is: CVE-2026-54498 is a high-severity cross-site scripting vulnerability in ViewComponent view_component, published on 17 Jul 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54498 exists.\n\nAffected packages and fixed versions:\n- view_component (RubyGems): affected from 4.0.0; fixed in 4.12.0\n- view_component (RubyGems): affected from 4.0.0; fixed in 4.12.0\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-2026-54498/ (Markdown: https://insights.sbomify.com/CVE-2026-54498/index.md)","id":"CVE-2026-54498","markdown":"https://insights.sbomify.com/CVE-2026-54498/index.md","name":"CVE-2026-54498","record":{"aliases":["GHSA-97jw-64cj-jc58"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby on Rails library","requires_auth":"low_privilege","summary":"Attackers can inject malicious scripts via around_render in ViewComponent, leading to XSS in Ruby on Rails applications.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"view_component","vendor":"viewcomponent"}],"cvss":{"score":8.7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From 4.0.0 until 4.12.0, ViewComponent::Base#around_render can return HTML-unsafe strings that bypass the escaping behavior applied to normal #call return values. This creates an XSS risk when downstream applications use around_render to wrap, replace, instrument, or conditionally return content that includes user-controlled data, and ViewComponent::Collection#render_in can amplify the issue by joining per-item results and marking the entire output html_safe, converting raw unsafe output into an ActiveSupport::SafeBuffer. This issue is fixed in version 4.12.0.","ecosystems":["RubyGems"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"view_component: around_render HTML-Safety Bypass","id":"CVE-2026-54498","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":4,"next":{"headline":"Stanza: Remote Code Execution via Unsafe Pickle Deserialization in Model Loaders","id":"CVE-2026-54499"},"packages":[{"ecosystem":"RubyGems","fixed":["4.12.0"],"introduced":["4.0.0"],"last_affected":[],"package":"view_component","purl":null,"source":"GHSA-97jw-64cj-jc58"},{"ecosystem":"RubyGems","fixed":["4.12.0"],"introduced":["4.0.0"],"last_affected":[],"package":"view_component","purl":"pkg:gem/view_component","source":"GHSA-97jw-64cj-jc58"}],"prev":{"headline":"view_component: Reused Component Instances Retain Stale Render Context","id":"CVE-2026-54497"},"products":["view_component"],"published":"2026-07-17","related":[{"cvss_score":6.8,"headline":"view_component: Reused Component Instances Retain Stale Render Context","id":"CVE-2026-54497","kev_date_added":null,"published":"2026-07-17"},{"cvss_score":6.1,"headline":"view_component Cross-site Scripting vulnerability","id":"CVE-2024-21636","kev_date_added":null,"published":"2024-01-04"},{"cvss_score":5.9,"headline":"view_component: System Test Entry Point Path Check Allows Sibling Directory Escape","id":"CVE-2026-44837","kev_date_added":null,"published":"2026-05-26"}],"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":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-20","vendors":["ViewComponent"]},"summary":"Attackers can inject malicious scripts via around_render in ViewComponent, leading to XSS in Ruby on Rails applications.","url":"https://insights.sbomify.com/CVE-2026-54498/"}