-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions and environment
Magento versions tested: 2.4.6-p12 and 2.4.8-p1
Issue: When incorrect parameters are sent, Magento 2 responds incorrectly (the exception is masked and not reflected in the response code).
There is simple product processing with potentially hazardous parameters, for example:
qty=jvos
Under the hood, Magento sets data in PreconfiguredValues using data from buyRequest without validation:
\Magento\Wishlist\Plugin\Helper\Product\View::beforePrepareAndRender
\Magento\Catalog\Block\Product\View::getProductDefaultQty
I believe that setting the value in the Qty field should be performed only if qty is numeric.
Correct processing of this parameter (or possibly another parameter that causes the issue) would lead to proper cache behavior, since 5xx errors are not cached by default.
Steps to reproduce
Open any product and set the incorrect qty params on simple product
Expected result
M2 Returns 200(OK) code which can help prevent DDoS attack to the merchant
Actual result
M2 Returns 500 code which is one of the reasons of DDoS attack to the merchant
Additional information
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Labels
Type
Projects
Status

