-
Notifications
You must be signed in to change notification settings - Fork 219
Prevent code injection in Excel export #3313
Copy link
Copy link
Open
Labels
type: bugSomething isn't workingSomething isn't workingtype: securityver: 7.2.23Fixed in versionFixed in versionver: 7.3.0Fixed in versionFixed in version
Milestone
Description
Environment
Jmix version: 7.2
Bug Description
It's possible to put an executable value (=cmd|) to the exported excel file.
Steps To Reproduce
- Create an entity with
Stringfield - Create screens
- Add the
excelaction to the browse screen - Create a new entity instance, set String field value to
=CMD|' /c echo TEST > c:\temp\test.txt'!A0or any other=cmdscript - Export to excel
Current Behavior
The script value is set as is and can be executed (In my case I have to navigate to a cell and press enter).
Expected Behavior
The script value cannot be executed.
Possible solution
The script value is quoted, i.e. the ' is added to the begging of the value so that it's treated as a regular string.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't workingtype: securityver: 7.2.23Fixed in versionFixed in versionver: 7.3.0Fixed in versionFixed in version