Reflex arbitrary method call in stimulus_reflex
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-28121
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 01:13 UTC · Revision 1
Source evidence
Reflex arbitrary method call in stimulus_reflex
core-osv · Original sourcePublished 12 Mar 2024, 19:44 UTC
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.
osv:CVE-2024-28121
Complete source record
{
"id": "6f033a2c4e7ab35eb854d5c6cd3d17acdae021f67c6b9e8ec88c63261af1b3c8",
"url": "https://osv.dev/vulnerability/CVE-2024-28121",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Reflex arbitrary method call in stimulus_reflex",
"summary": "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.",
"evidence": "osv:CVE-2024-28121",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2024-28121",
"aliases": [
"CVE-2024-28121",
"GHSA-f78j-4w3g-4q65"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/stimulusreflex/stimulus_reflex",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "01803ad6a3cf85b6ee01a3b316a3feb206f3863d"
},
{
"introduced": "4b26f314dfbf699e19f9311b1a7bd253bc4eb46c"
},
{
"fixed": "538582d240439aab76066c72335ea92096cd0c7f"
},
{
"fixed": "3de99e49b5bc4bc477d92a3c550eb7b7cf56a8b7"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.4.2"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre1:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre1"
},
{
"last_affected": "3.5.0-pre1"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre10:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre10"
},
{
"last_affected": "3.5.0-pre10"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre2:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre2"
},
{
"last_affected": "3.5.0-pre2"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre3:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre3"
},
{
"last_affected": "3.5.0-pre3"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre4:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre4"
},
{
"last_affected": "3.5.0-pre4"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre5:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre5"
},
{
"last_affected": "3.5.0-pre5"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre6:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre6"
},
{
"last_affected": "3.5.0-pre6"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre7:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre7"
},
{
"last_affected": "3.5.0-pre7"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre8:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre8"
},
{
"last_affected": "3.5.0-pre8"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:pre9:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-pre9"
},
{
"last_affected": "3.5.0-pre9"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:rc1:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-rc1"
},
{
"last_affected": "3.5.0-rc1"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:rc2:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-rc2"
},
{
"last_affected": "3.5.0-rc2"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:stimulusreflex:stimulusrelfex:3.5.0:rc3:*:*:*:*:*:*",
"range": [
{
"introduced": "3.5.0-rc3"
},
{
"last_affected": "3.5.0-rc3"
}
],
"source": "CPE_STRING"
},
{
"range": [
{
"fixed": "538582d240439aab76066c72335ea92096cd0c7f"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "01803ad6a3cf85b6ee01a3b316a3feb206f3863d"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v3.4.2"
},
{
"range": [
{
"fixed": "3de99e49b5bc4bc477d92a3c550eb7b7cf56a8b7"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v3.5.0.rc4"
}
]
}
}
],
"versions": [
"3.5.0-pre1",
"3.5.0-pre10",
"3.5.0-pre2",
"3.5.0-pre3",
"3.5.0-pre4",
"3.5.0-pre5",
"3.5.0-pre6",
"3.5.0-pre7",
"3.5.0-pre8",
"3.5.0-pre9",
"3.5.0-rc1",
"3.5.0-rc2",
"3.5.0-rc3",
"v3.4.1",
"v3.5.0.rc3",
"v3.5.0.rc2",
"v3.5.0.rc1",
"v3.5.0.pre10",
"v3.5.0.pre9",
"v3.5.0.pre8",
"v3.5.0.pre7",
"v3.5.0.pre6",
"v3.5.0.pre5",
"v3.5.0.pre4",
"v3.5.0.pre3",
"v3.5.0.pre2",
"v3.5.0.pre1",
"v3.4.0",
"v3.4.0.pre9",
"v3.4.0.pre8",
"v3.4.0.pre7",
"v3.4.0.pre6",
"v3.4.0.pre5",
"v3.4.0.pre4",
"v3.4.0.pre3",
"v3.4.0.pre2",
"v3.4.0.pre1",
"v3.4.0.pre0",
"v3.3.0",
"v3.3.0.pre6",
"v3.3.0.pre5",
"v3.3.0.pre4",
"v3.3.0.pre3",
"v3.3.0.pre2",
"v3.3.0.pre1",
"v3.3.0.pre0",
"v3.2.3",
"v3.2.2",
"v3.2.2.pre1",
"v3.2.2.pre0",
"v3.2.1",
"v3.2.0",
"v3.2.0.pre1",
"v3.2.0-pre0",
"v3.2.0.pre0",
"v3.1.4",
"v3.1.3",
"v3.1.2",
"v3.1.1",
"v3.1.0",
"v3.0.0",
"v2.2.3",
"v2.2.2",
"v2.2.1",
"v2.2.0",
"v2.1.9",
"v2.1.8",
"v2.1.7",
"v2.1.6",
"v2.1.5",
"v2.1.4",
"v2.1.3",
"v2.1.2",
"v2.1.1",
"v2.1.0",
"v2.0.2",
"v2.0.1",
"v2.0.0",
"v1.1.1",
"v1.1.0",
"v1.0.2",
"v1.0.1",
"v1.0.0",
"v0.3.3",
"v0.3.2",
"v0.3.1",
"v0.3.0",
"v0.2.0",
"v0.1.12",
"v0.1.10",
"v0.1.9",
"v0.1.8",
"v0.1.7",
"v0.1.6",
"v0.1.5",
"v0.1.4",
"v0.1.3",
"v0.1.2",
"v0.1.1",
"v0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-28121.json"
}
}
],
"modified": "2026-10-28T02:30:25.075276379Z",
"provider": "osv",
"references": [
"https://github.com/stimulusreflex/stimulus_reflex/blob/0211cad7d60fe96838587f159d657e44cee51b9b/app/channels/stimulus_reflex/channel.rb#L83",
"https://github.com/stimulusreflex/stimulus_reflex/releases/tag/v3.4.2",
"https://github.com/stimulusreflex/stimulus_reflex/releases/tag/v3.5.0.rc4",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/28xxx/CVE-2024-28121.json",
"https://github.com/stimulusreflex/stimulus_reflex/security/advisories/GHSA-f78j-4w3g-4q65",
"https://nvd.nist.gov/vuln/detail/CVE-2024-28121",
"https://github.com/stimulusreflex/stimulus_reflex/commit/538582d240439aab76066c72335ea92096cd0c7f"
],
"provider_metadata": {
"cwe_ids": [
"CWE-470"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/28xxx/CVE-2024-28121.json"
}
},
"related_cves": [
{
"value": "CVE-2024-28121",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 491487,
"published_at": "2024-03-12T19:44:29.591+00:00"
}