{"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-54497 exists.","fix":"Upgrade view_component to 4.12.0 or later.","what":"CVE-2026-54497 is a medium-severity vulnerability in ViewComponent view_component, published on 17 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-54497 and fix it if it is affected.\n\nWhat it is: CVE-2026-54497 is a medium-severity vulnerability in ViewComponent view_component, published on 17 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54497 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-54497/ (Markdown: https://insights.sbomify.com/CVE-2026-54497/index.md)","id":"CVE-2026-54497","markdown":"https://insights.sbomify.com/CVE-2026-54497/index.md","name":"CVE-2026-54497","record":{"aliases":["GHSA-9h85-g7w3-rh49"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby on Rails component library","requires_auth":"low_privilege","summary":"Reusing ViewComponent instances across requests leaks stale context, potentially exposing privileged UI or data to unauthorized users.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"view_component","vendor":"viewcomponent"}],"cvss":{"score":6.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-668","name":"Exposure of Resource to Wrong Sphere"},{"id":"CWE-488","name":"Exposure of Data Element to Wrong Session"},{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"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 instances retain render-scoped objects across calls to render_in; if the same component, collection, or spacer component instance is reused across requests, users, tenants, or threads, later renders can use stale helpers, controller, request, view_flow, format/variant details, and slot child context from an earlier render. This can cause authorization-aware components to render privileged UI for a lower-privileged user, generate links using a stale Host header, leak slot/helper state, and mix request context under concurrent rendering. 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: Reused Component Instances Retain Stale Render Context","id":"CVE-2026-54497","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"information_disclosure","year":"2026"},"n_packages":2,"n_references":3,"next":{"headline":"view_component: around_render HTML-Safety Bypass","id":"CVE-2026-54498"},"packages":[{"ecosystem":"RubyGems","fixed":["4.12.0"],"introduced":["4.0.0"],"last_affected":[],"package":"view_component","purl":null,"source":"GHSA-9h85-g7w3-rh49"},{"ecosystem":"RubyGems","fixed":["4.12.0"],"introduced":["4.0.0"],"last_affected":[],"package":"view_component","purl":"pkg:gem/view_component","source":"GHSA-9h85-g7w3-rh49"}],"prev":{"headline":"Zebra: Missing copy constraint in halo2_gadgets variable-base scalar multiplication allows under-constrained base, breaking Orchard Action circuit soundness","id":"CVE-2026-54496"},"products":["view_component"],"published":"2026-07-17","related":[{"cvss_score":8.7,"headline":"view_component: around_render HTML-Safety Bypass","id":"CVE-2026-54498","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":"Reusing ViewComponent instances across requests leaks stale context, potentially exposing privileged UI or data to unauthorized users.","url":"https://insights.sbomify.com/CVE-2026-54497/"}