CVE-2021-43805 is a high-severity (CVSS 7.5) CWE-1333 vulnerability in solidus_core. 1 public exploit reference exists, so weaponization risk is real. A fix is available for solidus_core — see the affected versions and patch details below.
ReDos vulnerability on guest checkout email validation
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-43805 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
solidus_core💎solidus_core💎solidus_coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
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:
irb(main)> Spree::EmailValidator::EMAIL_REGEXP.match "[email protected].@"
processing time: 54.293660s
=> nil
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:
bin/rails solidus:check_orders_with_invalid_email
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:
config.after_initialize do
Spree::EmailValidator.send(:remove_const, :EMAIL_REGEXP)
Spree::EmailValidator::EMAIL_REGEXP = URI::MailTo::EMAIL_REGEXP
end
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 [email protected]
- Contact the core team on Slack
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | solidus_core | all versions | 2.11.13bundle update solidus_core --conservative |
| 💎RubyGems | solidus_core | ≥ 3.0.0&&< 3.0.4 | 3.0.4bundle update solidus_core --conservative |
| 💎RubyGems | solidus_core | ≥ 3.1.0&&< 3.1.4 | 3.1.4bundle update solidus_core --conservative |
Affected Products
solidusnebulabResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for solidus_core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update solidus_core to 2.11.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-43805 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is CVE-2021-43805 in your dependencies?
Find it across RubyGems, including transitive dependencies.