wudijun opened a new issue, #4559:
URL: https://github.com/apache/shenyu/issues/4559

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Current Behavior
   
   Apache shenyu version 2.5.1 has added SPEL expressions, which allow 
attackers to enter malicious SPEL to execute arbitrary system commands
   
   ### Expected Behavior
   
   Security filtering is recommended for SPEL expressions
   
   ### Steps To Reproduce
   
   In version 2.5.1, the Mock plugin has been added and supports SPEL 
expression functionality, which creates a security issue that allows attackers 
to execute arbitrary system commands through SEPL expressions
   
   
![image](https://user-images.githubusercontent.com/95115088/232279882-7d4a73af-6375-4c32-947f-175422b452c4.png)
   
   
   1.Create a new selector at Mock
   
   
![image](https://user-images.githubusercontent.com/95115088/232280095-f12af80b-2517-46e7-a167-d484cf7cbb02.png)
   
   2.Create a new corresponding rule and enter a malicious SPEL expression here 
with the content of ${expression | T (java. lang. Runtime). getRuntime(). exec 
("calc. exe")}
   
   
![image](https://user-images.githubusercontent.com/95115088/232280214-e606830f-6a24-4a73-9ac0-f7173d2bc2a9.png)
   
   3.Click to confirm and access the corresponding URL
   
   Click the Confirm button, and after visiting the corresponding path, you can 
see that the calculator has successfully popped up. The same is true for Linux 
systems, attackers can execute arbitrary system commands in this way,It is 
recommended to filter here
   
   
![image](https://user-images.githubusercontent.com/95115088/232280492-8b20e675-13af-45f9-a90d-467f849173b0.png)
   
   
![image](https://user-images.githubusercontent.com/95115088/232280533-99fb2698-169b-4caf-863d-bdad696cf7ad.png)
   
   
   
   ### Environment
   
   ```markdown
   ShenYu version(s):2.5.1
   ```
   
   
   ### Debug logs
   
   _No response_
   
   ### Anything else?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to