Описание
ReDos vulnerability on guest checkout email validation
Impact
Denial of service vulnerability that could be exploited during a guest checkout. The regular expression used to validate a guest order's email was subject to exponential backtracking through a fragment like a.a..
Before the patch, it can be reproduced in the console like this:
To reproduce in the browser, fill in the "Customer Email" field with that fake email address during a guest checkout. Before that, you should open the browser dev tools and change the type attribute for that field from email to text. After entering a fake address and pressing the "Save & Continue" button, the browser will take a long term to perform the request before showing an error message for the invalid address. Eventually, making the email string even longer could lead to the exhaustion of server resources.
Patches
Versions 3.1.4, 3.0.4, and 2.11.13 have been patched to use a different regular expression.
There's an improbable chance that some orders in your system end up having associated an email address that is no longer valid. We've added a task to check precisely that:
The above will print information for every affected order if any.
Workarounds
If a prompt upgrade is not an option, please, add the following to config/application.rb:
References
For more information
If you have any questions or comments about this advisory:
- Open an issue or a discussion in Solidus.
- Email us at security@solidus.io
- Contact the core team on Slack
Ссылки
- https://github.com/solidusio/solidus/security/advisories/GHSA-qxmr-qxh6-2cc9
- https://nvd.nist.gov/vuln/detail/CVE-2021-43805
- https://github.com/solidusio/solidus/commit/6be174c955fad84017ca67589c676526bc5ade71
- https://github.com/solidusio/solidus/commit/9867153e01e3c3b898cdbcedd7b43375ea922401
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/solidus_core/CVE-2021-43805.yml
Пакеты
solidus_core
< 2.11.13
2.11.13
solidus_core
>= 3.0.0, < 3.0.4
3.0.4
solidus_core
>= 3.1.0, < 3.1.4
3.1.4
Связанные уязвимости
Solidus is a free, open-source ecommerce platform built on Rails. Versions of Solidus prior to 3.1.4, 3.0.4, and 2.11.13 have a denial of service vulnerability that could be exploited during a guest checkout. The regular expression used to validate a guest order's email was subject to exponential backtracking through a fragment like `a.a.` Versions 3.1.4, 3.0.4, and 2.11.13 have been patched to use a different regular expression. The maintainers added a check for email addresses that are no longer valid that will print information about any affected orders that exist. If a prompt upgrade is not an option, a workaround is available. It is possible to edit the file `config/application.rb` manually (with code provided by the maintainers in the GitHub Security Advisory) to check email validity.