CVE-2023-48220 Decidim's devise_invitable gem vulnerable to circumvention of invitation token expiry period

Medium 5.7 Published Updated

Attackers can accept expired invitations via password reset, potentially taking over accounts in Decidim applications.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-48220?

CVE-2023-48220 is a medium-severity vulnerability in decidim, published on 20 Feb 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

Official description

Decidim is a participatory democracy framework. Starting in version 0.4.rc3 and prior to version 2.0.9 of the `devise_invitable` gem, the invites feature allows users to accept the invitation for an unlimited amount of time through the password reset functionality. This issue creates vulnerable dependencies starting in version 0.0.1.alpha3 and prior to versions 0.26.9, 0.27.5, and 0.28.0 of the `decidim,` `decidim-admin`, and `decidim-system` gems. When using the password reset functionality, the `devise_invitable` gem always accepts the pending invitation if the user has been invited. The only check done is if the user has been invited but the code does not ensure that the pending invitation is still valid as defined by the `invite_for` expiry period. Decidim sets this configuration to `2.weeks` so this configuration should be respected. The bug is in the `devise_invitable` gem and should be fixed there and the dependency should be upgraded in Decidim once the fix becomes available. `devise_invitable` to version `2.0.9` and above fix this issue. Versions 0.26.9, 0.27.5, and 0.28.0 of the `decidim,` `decidim-admin`, and `decidim-system` gems contain this fix. As a workaround, invitations can be cancelled directly from the database.

Weakness: CWE-672

Which versions are affected by CVE-2023-48220?

14 open source packages ship an affected version, including decidim, decidim-admin and decidim-system. It affects 2 products.

PackageAffectedFixed in
decidim RubyGemsFrom 0.0.1.alpha30.26.9
decidim RubyGemsFrom 0.0.1.alpha30.26.9
decidim RubyGemsFrom 0.27.00.27.5
decidim RubyGemsFrom 0.27.00.27.5
decidim-admin RubyGemsFrom 0.0.1.alpha30.26.9
decidim-admin RubyGemsFrom 0.0.1.alpha30.26.9
8 more packages
decidim-admin RubyGemsFrom 0.27.00.27.5
decidim-admin RubyGemsFrom 0.27.00.27.5
decidim-system RubyGemsFrom 0.0.1.alpha30.26.9
decidim-system RubyGemsFrom 0.0.1.alpha30.26.9
decidim-system RubyGemsFrom 0.27.00.27.5
decidim-system RubyGemsFrom 0.27.00.27.5
devise_invitable RubyGemsFrom 0.4.rc32.0.9
devise_invitable RubyGemsFrom 0.4.rc32.0.9

Products include Decidim Decidim, Scambra Devise Invitable.

How do I fix CVE-2023-48220?

Upgrade decidim to a fixed version for your release line: 0.26.9 or 0.27.5.

Is CVE-2023-48220 being exploited?

There is no known exploitation of CVE-2023-48220 in the wild and no public exploit code.

Sources

Also known as GHSA-w3q8-m492-4pwp.

Is CVE-2023-48220 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free