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

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

- **Severity:** Medium 5.7 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N`)
- **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:** Yes
- **Published:** 20 Feb 2024
- **Updated:** 24 Apr 2025
- **Also known as:** GHSA-w3q8-m492-4pwp

## 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 (Operation on a Resource after Expiration or Release)

## 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.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `decidim` | RubyGems | From 0.0.1.alpha3 | 0.26.9 |
| `decidim` | RubyGems | From 0.0.1.alpha3 | 0.26.9 |
| `decidim` | RubyGems | From 0.27.0 | 0.27.5 |
| `decidim` | RubyGems | From 0.27.0 | 0.27.5 |
| `decidim-admin` | RubyGems | From 0.0.1.alpha3 | 0.26.9 |
| `decidim-admin` | RubyGems | From 0.0.1.alpha3 | 0.26.9 |
| `decidim-admin` | RubyGems | From 0.27.0 | 0.27.5 |
| `decidim-admin` | RubyGems | From 0.27.0 | 0.27.5 |
| `decidim-system` | RubyGems | From 0.0.1.alpha3 | 0.26.9 |
| `decidim-system` | RubyGems | From 0.0.1.alpha3 | 0.26.9 |
| `decidim-system` | RubyGems | From 0.27.0 | 0.27.5 |
| `decidim-system` | RubyGems | From 0.27.0 | 0.27.5 |
| `devise_invitable` | RubyGems | From 0.4.rc3 | 2.0.9 |
| `devise_invitable` | RubyGems | From 0.4.rc3 | 2.0.9 |

Products: 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.

## Other vulnerabilities in decidim

- [CVE-2026-23891](https://insights.sbomify.com/CVE-2026-23891/): Decidim has a Cross-site scripting (XSS) vulnerability via user name field (critical 9.3)
- [CVE-2023-36465](https://insights.sbomify.com/CVE-2023-36465/): Decidim has broken access control in templates (critical 9.1)
- [CVE-2025-65017](https://insights.sbomify.com/CVE-2025-65017/): Decidim's private data exports can lead to data leaks (high 8.2)
- [CVE-2023-32693](https://insights.sbomify.com/CVE-2023-32693/): Decidim Cross-site Scripting vulnerability in the external link redirections (high 8.1)
- [CVE-2023-34089](https://insights.sbomify.com/CVE-2023-34089/): Decidim Cross-site Scripting vulnerability in the processes filter (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-48220 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2023-48220 in the wild and no public exploit code.

Affected packages and fixed versions:
- decidim (RubyGems): affected from 0.0.1.alpha3; fixed in 0.26.9
- decidim (RubyGems): affected from 0.0.1.alpha3; fixed in 0.26.9
- decidim (RubyGems): affected from 0.27.0; fixed in 0.27.5
- decidim (RubyGems): affected from 0.27.0; fixed in 0.27.5
- decidim-admin (RubyGems): affected from 0.0.1.alpha3; fixed in 0.26.9
- decidim-admin (RubyGems): affected from 0.0.1.alpha3; fixed in 0.26.9
- decidim-admin (RubyGems): affected from 0.27.0; fixed in 0.27.5
- decidim-admin (RubyGems): affected from 0.27.0; fixed in 0.27.5
- decidim-system (RubyGems): affected from 0.0.1.alpha3; fixed in 0.26.9
- decidim-system (RubyGems): affected from 0.0.1.alpha3; fixed in 0.26.9
- decidim-system (RubyGems): affected from 0.27.0; fixed in 0.27.5
- decidim-system (RubyGems): affected from 0.27.0; fixed in 0.27.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-48220/ (Markdown: https://insights.sbomify.com/CVE-2023-48220/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-48220
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-48220
- OSV: https://osv.dev/vulnerability/CVE-2023-48220

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-48220/
Summaries are generated and may contain mistakes; the official description above is the record.
