-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Admin user can call arbitrary Module class's constructor via Cart Price Rules #35135
Comments
Hi @oskar-olaussen. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-November. Thank you for working on this issue.
|
@nathanjosiah, just tagging you in here, sounds security related. |
❌ You don't have permission to export this issue. |
@hostep I don't see an issue with this. When the rule model loads the post data there is a check that the requested class implements the ConditionInterface. The error in this report is due to a typo ( |
@nathanjosiah Thanks for the response! Not currently on my work computer but I'm fairly certain that by following the steps I provided the error logged was about the method setId not existing in the class provided, implying that the class was instantiated and then the method was called on it. The code uses the object manager directly so are you sure the flow goes through the factory referenced? |
@oskarolaussen @engcom-November I see the issue, it is with the Html retrieval controller https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/NewActionHtml.php#L32 This is definitely not ideal and there should be a validation check here but I don't see how this could be attacked with how it is currently written. I have created a ticket for this internally as a defense-in-depth ticket but it looks very unlikely to be exploitable as-is. There would need to be a class that can cause harm by having Ticket created https://jira.corp.magento.com/browse/AC-2571 |
Thanks for the update @nathanjosiah. Confirming the issue. |
✅ Jira issue https://jira.corp.magento.com/browse/AC-2581 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
Hi @SergeyP18. Thank you for working on this issue.
|
…ce Rule magento#35135 Redefined the check of the using class
Preconditions (*)
Steps to reproduce (*)
Create a new Cart Price Rule
Modify value of Conditions option value in browser's inspect. For example:
Select the option that you have modified.
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
The text was updated successfully, but these errors were encountered: