{"answers":{"affected":"8 open source packages ship an affected version, including stimulus_reflex. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-28121 in the wild and no public exploit code.","fix":"Upgrade stimulus_reflex to a fixed version for your release line: 3.4.2, 3.5.0.rc4 or 3.5.0-rc4.","what":"CVE-2024-28121 is a high-severity code injection vulnerability in stimulusreflex stimulus_reflex, published on 12 Mar 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-28121 and fix it if it is affected.\n\nWhat it is: CVE-2024-28121 is a high-severity code injection vulnerability in stimulusreflex stimulus_reflex, published on 12 Mar 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-28121 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- stimulus_reflex (RubyGems): affected all versions; fixed in 3.4.2\n- stimulus_reflex (RubyGems): affected all versions; fixed in 3.4.2\n- stimulus_reflex (RubyGems): affected from 3.5.0.pre0; fixed in 3.5.0.rc4\n- stimulus_reflex (RubyGems): affected from 3.5.0.pre0; fixed in 3.5.0.rc4\n- stimulus_reflex (npm): affected all versions; fixed in 3.4.2\n- stimulus_reflex (npm): affected all versions; fixed in 3.4.2\n- stimulus_reflex (npm): affected from 3.5.0-pre0; fixed in 3.5.0-rc4\n- stimulus_reflex (npm): affected from 3.5.0-pre0; fixed in 3.5.0-rc4\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-28121/ (Markdown: https://insights.sbomify.com/CVE-2024-28121/index.md)","id":"CVE-2024-28121","markdown":"https://insights.sbomify.com/CVE-2024-28121/index.md","name":"CVE-2024-28121","record":{"aliases":["GHSA-f78j-4w3g-4q65"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby on Rails library","requires_auth":"low_privilege","summary":"Attackers can invoke unintended methods on Reflex instances via websockets, potentially leading to code execution or privilege escalation in Rails applications.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"stimulusrelfex","vendor":"stimulusreflex"}],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-470","name":"Use of Externally-Controlled Input to Select Classes or Code"}],"description":"stimulus_reflex is a system to extend the capabilities of both Rails and Stimulus by intercepting user interactions and passing them to Rails over real-time websockets. In affected versions more methods than expected can be called on reflex instances. Being able to call some of them has security implications. To invoke a reflex a websocket message of the following shape is sent: `\\\"target\\\":\\\"[class_name]#[method_name]\\\",\\\"args\\\":[]`. The server will proceed to instantiate `reflex` using the provided `class_name` as long as it extends `StimulusReflex::Reflex`. It then attempts to call `method_name` on the instance with the provided arguments. This is problematic as `reflex.method method_name` can be more methods that those explicitly specified by the developer in their reflex class. A good example is the instance_variable_set method. This vulnerability has been patched in versions 3.4.2 and 3.5.0.rc4. Users unable to upgrade should: see the backing GHSA advisory for mitigation advice.","ecosystems":["RubyGems","npm"],"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":"Reflex arbitrary method call in stimulus_reflex","id":"CVE-2024-28121","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":8,"n_references":6,"next":{"headline":"JWX vulnerable to a denial of service attack using compressed JWE message","id":"CVE-2024-28122"},"packages":[{"ecosystem":"RubyGems","fixed":["3.4.2"],"introduced":["0"],"last_affected":[],"package":"stimulus_reflex","purl":null,"source":"GHSA-f78j-4w3g-4q65"},{"ecosystem":"RubyGems","fixed":["3.4.2"],"introduced":["0"],"last_affected":[],"package":"stimulus_reflex","purl":"pkg:gem/stimulus_reflex","source":"GHSA-f78j-4w3g-4q65"},{"ecosystem":"RubyGems","fixed":["3.5.0.rc4"],"introduced":["3.5.0.pre0"],"last_affected":[],"package":"stimulus_reflex","purl":null,"source":"GHSA-f78j-4w3g-4q65"},{"ecosystem":"RubyGems","fixed":["3.5.0.rc4"],"introduced":["3.5.0.pre0"],"last_affected":[],"package":"stimulus_reflex","purl":"pkg:gem/stimulus_reflex","source":"GHSA-f78j-4w3g-4q65"},{"ecosystem":"npm","fixed":["3.4.2"],"introduced":["0"],"last_affected":[],"package":"stimulus_reflex","purl":null,"source":"GHSA-f78j-4w3g-4q65"},{"ecosystem":"npm","fixed":["3.4.2"],"introduced":["0"],"last_affected":[],"package":"stimulus_reflex","purl":"pkg:npm/stimulus_reflex","source":"GHSA-f78j-4w3g-4q65"},{"ecosystem":"npm","fixed":["3.5.0-rc4"],"introduced":["3.5.0-pre0"],"last_affected":[],"package":"stimulus_reflex","purl":null,"source":"GHSA-f78j-4w3g-4q65"},{"ecosystem":"npm","fixed":["3.5.0-rc4"],"introduced":["3.5.0-pre0"],"last_affected":[],"package":"stimulus_reflex","purl":"pkg:npm/stimulus_reflex","source":"GHSA-f78j-4w3g-4q65"}],"prev":{"headline":"API key leak in codeium-chrome","id":"CVE-2024-28120"},"products":["stimulus_reflex"],"published":"2024-03-12","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":"total"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["stimulusreflex"]},"summary":"Attackers can invoke unintended methods on Reflex instances via websockets, potentially leading to code execution or privilege escalation in Rails applications.","url":"https://insights.sbomify.com/CVE-2024-28121/"}