Vulnerabilities in pkg:gem/decidim-system
PACKAGECVE-2023-48220 is a MODERATE (CVSS 5.7) possibility to circumvent the invitation vulnerability (CWE-672: Operation on a Resource after Expiration or Release) affecting Decidim libraries in the RubyGems ecosystem. The issue involves possibility to circumvent the invitation token expiry period. Remediation is available by upgrading affected packages to version 0.26.9, 2.0.9, 0.27.5.
pkg:gem/decidim-system
Vulnerability advisories affecting package pkg:gem/decidim-system. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-w3q8-m492-4pwp | CVE-2023-48220 | MODERATE | Possibility to circumvent the invitation token expiry period |
CVE-2023-48220 at a Glance
Security Impact
CVSS: 5.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2023-48220
To remediate this vulnerability, upgrade all affected Decidim dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade decidim to 0.26.9
Upgrade decidim-admin to 0.26.9
Upgrade decidim-system to 0.26.9
Upgrade devise_invitable to 2.0.9
Upgrade decidim to 0.27.5
Upgrade decidim-admin to 0.27.5
Upgrade decidim-system to 0.27.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for decidim
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-48220, inspect your project dependencies for Decidim:
inspect dependencies for decidim
Analyze the terminal output to locate any version of Decidim in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.26.9), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-672: Operation on a Resource after Expiration or Release, where the product uses, accesses, or otherwise operates on a resource after that resource has been expired, released, or revoked. In Decidim, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-48220 Affected Decidim Versions
7 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
decidim
|
RubyGems |
≥ 0.0.1.alpha3
< 0.26.9
|
0.26.9
|
|
decidim-admin
|
RubyGems |
≥ 0.0.1.alpha3
< 0.26.9
|
0.26.9
|
|
decidim-system
|
RubyGems |
≥ 0.0.1.alpha3
< 0.26.9
|
0.26.9
|
|
devise_invitable
|
RubyGems |
≥ 0.4.rc3
< 2.0.9
|
2.0.9
|
|
decidim
|
RubyGems |
≥ 0.27.0
< 0.27.5
|
0.27.5
|
|
decidim-admin
|
RubyGems |
≥ 0.27.0
< 0.27.5
|
0.27.5
|
|
decidim-system
|
RubyGems |
≥ 0.27.0
< 0.27.5
|
0.27.5
|
References
Frequently Asked Questions
What is CVE-2023-48220?
Which Decidim versions are affected?
What version fixes CVE-2023-48220?
Is decidim affected?
Is decidim-admin affected?
What is the CVSS score of CVE-2023-48220?
What CWE is associated with CVE-2023-48220?
How can I check RubyGems dependencies for CVE-2023-48220?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w3q8-m492-4pwp",
"modified" : "2024-02-20T19:26:51Z",
"published" : "2024-02-20T19:26:51Z",
"aliases" : [ "CVE-2023-48220" ],
"summary" : "Possibility to circumvent the invitation token expiry period",
"details" : "### Impact\nThe invites feature allows users to accept the invitation for an unlimited amount of time through the password reset functionality.\n\nWhen using the password reset functionality, the `devise_invitable` gem always accepts the pending invitation if the user has been invited as shown in this piece of code within the `devise_invitable` gem:\nhttps://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198\n\nThe 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 `invite_for` expiry period as explained in the gem's documentation:\nhttps://github.com/scambra/devise_invitable#model-configuration-\n\n> `invite_for`: The period the generated invitation token is valid. After this period, the invited resource won’t be able to accept the invitation. When `invite_for` is `0` (the default), the invitation won’t expire.\n\nDecidim sets this configuration to `2.weeks` so this configuration should be respected:\nhttps://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134\n\nThe 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.\n\n### Patches\nUpdate `devise_invitable` to version `2.0.9` or above by running the following command:\n\n```\n$ bundle update devise_invitable\n```\n\n### Workarounds\nThe invitations can be cancelled directly from the database by running the following command from the Rails console:\n\n```\n> Decidim::User.invitation_not_accepted.update_all(invitation_token: nil)\n```\n\n### References\nOWASP ASVS V4.0.3-2.3.1\n\nThis bug has existed in the `devise_invitable` gem since this commit which was first included in the `v0.4.rc3` release of this gem:\nhttps://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098\n\nAll versions since then are affected.\n\nThis gem was first introduced at its version `~> 1.7.0` to the `decidim-admin` gem in this commit which was first included in the `v0.0.1.alpha3` release of Decidim:\nhttps://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34\n\nIt was first introduced at its version `~> 1.7.0` to the `decidim-system` gem in this commit which was also first included in the `v0.0.1.alpha3` release of Decidim:\nhttps://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454\n\n### Credits\nThis issue was discovered in City of Helsinki's security audit against Decidim 0.27 done during September 2023. The security audit was implemented by [Deloitte Finland](https://www2.deloitte.com/fi/fi.html).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "decidim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1.alpha3"
}, {
"fixed" : "0.26.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "decidim-admin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1.alpha3"
}, {
"fixed" : "0.26.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "decidim-system"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.1.alpha3"
}, {
"fixed" : "0.26.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "devise_invitable"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.4.rc3"
}, {
"fixed" : "2.0.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "decidim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.27.0"
}, {
"fixed" : "0.27.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "decidim-admin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.27.0"
}, {
"fixed" : "0.27.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "decidim-system"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.27.0"
}, {
"fixed" : "0.27.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-48220"
}, {
"type" : "WEB",
"url" : "https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34"
}, {
"type" : "WEB",
"url" : "https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454"
}, {
"type" : "WEB",
"url" : "https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/decidim/decidim"
}, {
"type" : "WEB",
"url" : "https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134"
}, {
"type" : "WEB",
"url" : "https://github.com/decidim/decidim/releases/tag/v0.26.9"
}, {
"type" : "WEB",
"url" : "https://github.com/decidim/decidim/releases/tag/v0.27.5"
}, {
"type" : "WEB",
"url" : "https://github.com/decidim/decidim/releases/tag/v0.28.0"
}, {
"type" : "WEB",
"url" : "https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-672" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-20T19:26:51Z",
"nvd_published_at" : "2024-02-20T18:15:50Z"
}
}