{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2023-48220",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "state": "PUBLISHED",
        "assignerShortName": "GitHub_M",
        "dateReserved": "2023-11-13T13:25:18.480Z",
        "datePublished": "2024-02-20T17:24:37.791Z",
        "dateUpdated": "2024-08-02T21:23:39.264Z"
    },
    "containers": {
        "cna": {
            "title": "Decidim's devise_invitable gem vulnerable to circumvention of invitation token expiry period",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-672",
                            "lang": "en",
                            "description": "CWE-672: Operation on a Resource after Expiration or Release",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "attackComplexity": "HIGH",
                        "attackVector": "NETWORK",
                        "availabilityImpact": "NONE",
                        "baseScore": 5.7,
                        "baseSeverity": "MEDIUM",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "HIGH",
                        "privilegesRequired": "HIGH",
                        "scope": "UNCHANGED",
                        "userInteraction": "REQUIRED",
                        "vectorString": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N",
                        "version": "3.1"
                    }
                }
            ],
            "references": [
                {
                    "name": "https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp",
                    "tags": [
                        "x_refsource_CONFIRM"
                    ],
                    "url": "https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp"
                },
                {
                    "name": "https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34"
                },
                {
                    "name": "https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454"
                },
                {
                    "name": "https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098"
                },
                {
                    "name": "https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134"
                },
                {
                    "name": "https://github.com/decidim/decidim/releases/tag/v0.26.9",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/decidim/decidim/releases/tag/v0.26.9"
                },
                {
                    "name": "https://github.com/decidim/decidim/releases/tag/v0.27.5",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/decidim/decidim/releases/tag/v0.27.5"
                },
                {
                    "name": "https://github.com/decidim/decidim/releases/tag/v0.28.0",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/decidim/decidim/releases/tag/v0.28.0"
                },
                {
                    "name": "https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198"
                }
            ],
            "affected": [
                {
                    "vendor": "decidim",
                    "product": "decidim",
                    "versions": [
                        {
                            "version": ">= 0.0.1.alpha3, < 0.26.9",
                            "status": "affected"
                        },
                        {
                            "version": ">= 0.27.0, < 0.27.5",
                            "status": "affected"
                        },
                        {
                            "version": " >= 0.4.rc3, < 2.0.9",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2024-02-20T17:27:26.335Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "source": {
                "advisory": "GHSA-w3q8-m492-4pwp",
                "discovery": "UNKNOWN"
            }
        },
        "adp": [
            {
                "affected": [
                    {
                        "vendor": "decidim",
                        "product": "decidim",
                        "cpes": [
                            "cpe:2.3:a:decidim:decidim:*:*:*:*:*:*:*:*"
                        ],
                        "defaultStatus": "unknown",
                        "versions": [
                            {
                                "version": "0.0.1.alpha3",
                                "status": "affected",
                                "lessThan": "0.26.9",
                                "versionType": "custom"
                            },
                            {
                                "version": "0.27.0",
                                "status": "affected",
                                "lessThan": "0.27.5",
                                "versionType": "custom"
                            },
                            {
                                "version": "0.4.rc3",
                                "status": "affected",
                                "lessThan": "2.0.9",
                                "versionType": "custom"
                            }
                        ]
                    }
                ],
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2024-02-21T15:23:30.053194Z",
                                "id": "CVE-2023-48220",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-07-26T17:11:07.062Z"
                }
            },
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-02T21:23:39.264Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "name": "https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp",
                        "tags": [
                            "x_refsource_CONFIRM",
                            "x_transferred"
                        ],
                        "url": "https://github.com/decidim/decidim/security/advisories/GHSA-w3q8-m492-4pwp"
                    },
                    {
                        "name": "https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/decidim/decidim/commit/073e60e2e4224dd81815a784002ebba30f2ebb34"
                    },
                    {
                        "name": "https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/decidim/decidim/commit/b12800717a689c295a9ea680a38ca9f823d2c454"
                    },
                    {
                        "name": "https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/scambra/devise_invitable/commit/94d859c7de0829bf63f679ae5dd3cab2b866a098"
                    },
                    {
                        "name": "https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/decidim/decidim/blob/d2d390578050772d1bdb6d731395f1afc39dcbfc/decidim-core/config/initializers/devise.rb#L134"
                    },
                    {
                        "name": "https://github.com/decidim/decidim/releases/tag/v0.26.9",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/decidim/decidim/releases/tag/v0.26.9"
                    },
                    {
                        "name": "https://github.com/decidim/decidim/releases/tag/v0.27.5",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/decidim/decidim/releases/tag/v0.27.5"
                    },
                    {
                        "name": "https://github.com/decidim/decidim/releases/tag/v0.28.0",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/decidim/decidim/releases/tag/v0.28.0"
                    },
                    {
                        "name": "https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/scambra/devise_invitable/blob/41f58970ff76fb64382a9b9ea1bd530f7c3adab2/lib/devise_invitable/models.rb#L198"
                    }
                ]
            }
        ]
    }
}