CVE-2021-41263 Secure/signed cookies share secrets between sites in rails_multisite
Attackers can reuse signed cookies across different sites in multi-site Rails apps due to shared secrets, bypassing security controls.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-41263?
CVE-2021-41263 is a high-severity vulnerability in discourse rails_multisite, published on 15 Nov 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
rails_multisite provides multi-db support for Rails applications. In affected versions this vulnerability impacts any Rails applications using `rails_multisite` alongside Rails' signed/encrypted cookies. Depending on how the application makes use of these cookies, it may be possible for an attacker to re-use cookies on different 'sites' within a multi-site Rails application. The issue has been patched in v4 of the `rails_multisite` gem. Note that this upgrade will invalidate all previous signed/encrypted cookies. The impact of this invalidation will vary based on the application architecture.
Which versions are affected by CVE-2021-41263?
2 open source packages ship an affected version, including rails_multisite. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
rails_multisite RubyGems | All versions | 4.0.0 |
rails_multisite RubyGems | All versions | 4.0.0 |
Products include Discourse Rails Multisite.
How do I fix CVE-2021-41263?
Upgrade rails_multisite to 4.0.0 or later.
Is CVE-2021-41263 being exploited?
There is no known exploitation of CVE-2021-41263 in the wild and no public exploit code.
Sources
Also known as GHSA-844m-cpr9-jcmh.