{"id":"CVE-2021-43805","aliases":["CVE-2021-43805","GHSA-qxmr-qxh6-2cc9"],"related":[],"kind":"vulnerability","state":"published","title":"ReDos vulnerability on guest checkout email validation","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nDenial 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.`.\n\nBefore the patch, it can be reproduced in the console like this:\n\n```ruby\nirb(main)> Spree::EmailValidator::EMAIL_REGEXP.match \"a@a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.@\"\nprocessing time: 54.293660s\n=> nil\n```\n\nTo 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.\n\n\n### Patches\nVersions 3.1.4, 3.0.4, and 2.11.13 have been patched to use a different regular expression.\n\nThere'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:\n\n```bash\nbin/rails solidus:check_orders_with_invalid_email\n```\n\nThe above will print information for every affected order if any.\n\n### Workarounds\n\nIf a prompt upgrade is not an option, please, add the following to `config/application.rb`:\n\n```ruby\nconfig.after_initialize do\n  Spree::EmailValidator.send(:remove_const, :EMAIL_REGEXP)\n  Spree::EmailValidator::EMAIL_REGEXP = URI::MailTo::EMAIL_REGEXP\nend\n```\n\n### References\n\n- https://en.wikipedia.org/wiki/ReDoS\n- https://snyk.io/blog/redos-and-catastrophic-backtracking/\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an [issue](https://github.com/solidusio/solidus/issues) or a [discussion](https://github.com/solidusio/solidus/discussions) in Solidus.\n* Email us at [security@solidus.io](mailto:security@soliidus.io)\n* Contact the core team on [Slack](http://slack.solidus.io/)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Solidus es una plataforma de comercio electrónico gratuita y de código abierto construida sobre Rails. Las versiones de Solidus anteriores a la 3.1.4, 3.0.4 y 2.11.13 tienen una vulnerabilidad de denegación de servicio que podría ser explotada durante un pedido de invitados. La expresión regular usada para comprender el correo electrónico de un pedido de invitado estaba sujeta a un retroceso exponencial a través de un fragmento como `a.a.` Las versiones 3.1.4, 3.0.4 y 2.11.13 han sido parcheadas para usar una expresión regular diferente. Los mantenedores han añadido una comprobación de las direcciones de correo electrónico que ya no son válidas que imprimirá información sobre los pedidos afectados que se presentan. Si una actualización inmediata no es una opción, se presenta una solución disponible. Es posible editar el archivo \"config/application.rb\" manualmente (con el código proporcionado por los mantenedores en el aviso de seguridad de GitHub) para comprobar la validez del correo electrónico","source":"nvd"}],"published":"2021-12-07T17:25:09.000Z","modified":"2026-07-08T06:28:36.700Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":">= 3.1.0, < 3.1.4","status":"affected"},{"version":">= 3.0.0, < 3.0.4","status":"affected"},{"version":"< 2.11.13","status":"affected"}],"vendor":"solidusio","product":"solidus","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.11.13"}],"ecosystem":"RubyGems","package":"solidus_core","purl":"pkg:gem/solidus_core","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","fixed":"3.0.4"}],"ecosystem":"RubyGems","package":"solidus_core","purl":"pkg:gem/solidus_core","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.1.0","status":"affected","fixed":"3.1.4"}],"ecosystem":"RubyGems","package":"solidus_core","purl":"pkg:gem/solidus_core","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.11.13"},{"status":"affected","introduced":"3.0.0","fixed":"3.0.4"},{"status":"affected","introduced":"3.1.0","fixed":"3.1.4"}],"vendor":"nebulab","product":"solidus","cpe":"cpe:2.3:a:nebulab:solidus:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/solidusio/solidus/security/advisories/GHSA-qxmr-qxh6-2cc9","tags":["exploit","mitigation","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/solidusio/solidus/commit/9867153e01e3c3b898cdbcedd7b43375ea922401","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43805","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/solidusio/solidus/commit/6be174c955fad84017ca67589c676526bc5ade71","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/solidus_core/CVE-2021-43805.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/solidusio/solidus","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-43805","url":"https://www.cve.org/CVERecord?id=CVE-2021-43805","licence":"CVE Terms of Use","modified":"2024-08-04T04:03:08.816Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qxmr-qxh6-2cc9","url":"https://github.com/advisories/GHSA-qxmr-qxh6-2cc9","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:36.700Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-43805","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43805","licence":"Public domain","modified":"2026-06-17T04:11:28.453Z"}],"updatedAt":"2026-11-25T22:24:36.165Z","epss":{"score":0.01449,"percentile":0.74111,"date":"2026-12-01T12:00:22.000Z"}}