{"id":"CVE-2024-28121","published":"2024-03-12T19:44:29Z","modified":"2025-02-13T17:47:15Z","title":"Reflex arbitrary method call in stimulus_reflex","vendor":"stimulusreflex","product":"stimulus_reflex","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01555,"percentile":0.75774,"provenance":"source"},"cwes":[{"id":"CWE-470","name":"Use of Externally-Controlled Input to Select Classes or Code"}],"references":[{"url":"https://github.com/stimulusreflex/stimulus_reflex/security/advisories/GHSA-f78j-4w3g-4q65","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/stimulusreflex/stimulus_reflex/commit/538582d240439aab76066c72335ea92096cd0c7f","tags":["x_refsource_MISC"]},{"url":"https://github.com/stimulusreflex/stimulus_reflex/blob/0211cad7d60fe96838587f159d657e44cee51b9b/app/channels/stimulus_reflex/channel.rb#L83","tags":["x_refsource_MISC"]},{"url":"https://github.com/stimulusreflex/stimulus_reflex/releases/tag/v3.4.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/stimulusreflex/stimulus_reflex/releases/tag/v3.5.0.rc4","tags":["x_refsource_MISC"]},{"url":"http://seclists.org/fulldisclosure/2024/Mar/16","tags":[]}],"priority":{"score":21.3,"factors":[{"name":"EPSS percentile","points":15.15},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"stimulusreflex","affectedVersions":[{"vendor":"stimulusreflex","product":"stimulus_reflex","versions":[">= 3.5.0.rc1, < 3.5.0.rc4","< 3.4.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2024-03-13T14:29:13.739952Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"stimulus_reflex","vulnerableRanges":[">=3.5.0.pre0, <3.5.0.rc4","<3.4.2"],"patched":["3.5.0.rc4","3.4.2"],"from":["GHSA-f78j-4w3g-4q65"],"provenance":"source"},{"ecosystem":"npm","package":"stimulus_reflex","vulnerableRanges":[">=3.5.0-pre0, <3.5.0-rc4","<3.4.2"],"patched":["3.5.0-rc4","3.4.2"],"from":["GHSA-f78j-4w3g-4q65"],"provenance":"source"}],"summary":{"text":"The stimulus_reflex library for Rails, which passes user interactions to Rails over websockets, can be made to call methods on reflex instances beyond those the developer intended, because websocket messages name both the reflex class and the method to invoke. An attacker with low-privilege access to the application's websocket channel, and no user interaction required, can send a crafted message that calls methods such as instance_variable_set to manipulate server-side state.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:01:32Z"},"euvd":{"id":"EUVD-2024-0913","exploited":false,"provenance":"source"}}