-
Notifications
You must be signed in to change notification settings - Fork 610
[New Rule] React2Shell Detection #5408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
rules_building_block/initial_access_react_server_components_rce_attempt.toml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do RSC frameworks have unique features that could help this detection as-is? We can probably expand this beyond just nextjs flight behavior.
Based on traditional react apps and the event loop, I'd expect we would also want to capture the promise in this detection. Effectively that's the core of this cve.
rules_building_block/initial_access_react_server_components_rce_attempt.toml
Outdated
Show resolved
Hide resolved
rules_building_block/initial_access_react_server_components_rce_attempt.toml
Outdated
Show resolved
Hide resolved
rules_building_block/initial_access_react_server_components_rce_attempt.toml
Outdated
Show resolved
Hide resolved
rules_building_block/initial_access_react_server_components_rce_attempt.toml
Outdated
Show resolved
Hide resolved
…e_attempt.toml Co-authored-by: Samirbous <[email protected]>
rules_building_block/initial_access_react_server_components_rce_attempt.toml
Outdated
Show resolved
Hide resolved
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
rules/network/initial_access_react_server_components_rce_attempt.toml
Outdated
Show resolved
Hide resolved
rules/network/initial_access_react_server_components_rce_attempt.toml
Outdated
Show resolved
Hide resolved
…pt.toml Co-authored-by: Mika Ayenson, PhD <[email protected]>
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
| ( | ||
| http.request.body.content like~ "*__proto__*" or | ||
| http.request.body.content like~ "*prototype*" | ||
| ) and http.request.body.content like~ "*constructor*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double checking, should this be an and here or should we be using constructor as a filter? It looks like the exploit does not need to use the Function constructor. Clearly some do, and this appears to be the proper way to exploit the vulnerability (ref). However, if there is an RSC Flight implementation that does expose other functions might we miss it this way? (ref)
^ granted I know the earlier query phrase will catch the exploitation itself regardless so might not be worth the effort/potential noise. Generally speaking, __proto__ or prototype on their own are indicative of malicious behavior in Flight. (ref)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eric-forte-elastic great point! If I understand you correctly, the constructor is just one of many potential gadgets that could be used where __proto__ and prototype are nefarious enough in an RSC flight chunk?
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
Fixes #5406
Pull Request
Issue link(s):
Summary - What I changed
Adds a BBR rule for
Potential React.JS CVE-2025-55182 Exploit Attempt. Please see issue for more details. Testing has been done locally and on a deployed Azure instance with a custom app.How To Test
Query can be used in TRADE stack for verifying logic, reviewing events captured, etc.
Checklist
bug,enhancement,schema,maintenance,Rule: New,Rule: Deprecation,Rule: Tuning,Hunt: New, orHunt: Tuningso guidelines can be generatedmeta:rapid-mergelabel if planning to merge within 24 hoursContributor checklist