Medium, CVSS 5.7RubyGemsPublished
Possibility to circumvent the invitation token expiry period
CVE-2023-48220 · GHSA-w3q8-m492-4pwp
- Affected
- RubyGems decidim-system >= 0.0.1.alpha3, < 0.26.9; >= 0.27.0, < 0.27.5
- Fixed in
- 0.27.50.26.9· Vendor fix available
- Issue
- Impact The invites feature allows users to accept the invitation for an unlimited amount of time through the password reset functionality. When using the password reset functionality, the deviseinvitable gem always accepts the pending invitation if the user has been invited as shown in this piece of code within the deviseinvitable gem: https://github.com/scambra/deviseinvitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/deviseinvitable/models.rb#L198 The only check done here is if the user has been invited but the code does not ensure that the pending invitation is still valid as defined by the invitefor expiry period as explained in the gem's documentation: https://github.com/scambra/deviseinvitable#model-configuration- invitefor: The period the generated invitation token is valid. After this period, the invited resource won’t be able to accept the invitation. When invitefor is 0 (the default), the invitation won’t expire. Decidim sets this configuration to 2.weeks so this…
Recommended action: Upgrade to 0.27.5 or 0.26.9 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.