CVE-2024-28121
JavaScript vulnerability analysis and mitigation

Overview

StimulusReflex, a system that extends Rails and Stimulus capabilities through websocket interactions, was found to contain a vulnerability (CVE-2024-28121) that allows more methods than intended to be called on reflex instances. The vulnerability affects versions up to 3.4.1 and 3.5.0.rc3, with patches available in versions 3.4.2 and 3.5.0.rc4 (GitHub Advisory).

Technical details

The vulnerability stems from the way StimulusReflex handles method calls through websocket messages. When a reflex is invoked, a websocket message with the format {"target":"[class_name]#[method_name]","args":[]} is sent. The server instantiates a reflex using the provided class_name and attempts to call method_name with the provided arguments. The issue arises because reflex.method(method_name) can access more methods than those explicitly defined by developers in their reflex class, including potentially dangerous methods like instance_variable_set (GitHub Advisory, Full Disclosure).

Impact

The vulnerability could allow attackers to execute arbitrary code, manipulate trusted variables, and gain unauthorized access to debugging features. For example, attackers could overwrite trusted variables used in after_reflex callbacks, bind debugging servers, or drop processes into REPL sessions (GitHub Advisory).

Exploitability

The vulnerability can be exploited by sending specially crafted websocket messages to call unintended methods. For instance, an attacker could use the instance_variable_set method to overwrite trusted variables or exploit the render_collection method for arbitrary code execution. The vulnerability has a CVSS v3.1 base score of 8.8 (HIGH) with vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (GitHub Advisory).

Mitigation and workarounds

For users unable to upgrade immediately, a workaround is available by adding a guard in the ApplicationReflex class. This involves ensuring all reflexes inherit from ApplicationReflex and adding a before_reflex callback that validates method calls. The recommended solution is to upgrade to patched versions 3.4.2 or 3.5.0.rc4 (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-45618CRITICAL10
  • JavaScript logoJavaScript
  • liquidjs
NoYesAug 11, 2026
CVE-2026-48170CRITICAL9.1
  • JavaScript logoJavaScript
  • scim-patch
NoYesAug 07, 2026
CVE-2026-48007HIGH8.6
  • JavaScript logoJavaScript
  • @element-hq/element-call-embedded
NoYesAug 07, 2026
CVE-2026-69207MEDIUM5.3
  • JavaScript logoJavaScript
  • gemini-cli
NoYesAug 07, 2026
CVE-2026-71850MEDIUM4.8
  • JavaScript logoJavaScript
  • langfuse-fips-3
NoYesAug 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management