CVE-2026-40870
Decidim's comments API allows access to all commentable resources
Decidim is a participatory democracy framework. Starting in version 0.0.1 and prior to versions 0.30.5 and 0.31.1, the root level commentable field in the API allows access to all commentable resources within the platform, without any permission checks. All Decidim instances are impacted that have not secured the /api endpoint. The /api endpoint is publicly available with the default configuration. Versions 0.30.5 and 0.31.1 fix the issue. As a workaround, limit the scope to only authenticated users by limiting access to the /api endpoint. This would require custom code or installing the 3rd party module Decidim::Apiauth. With custom code, the /api endpoint can be limited to only authenticated users. The same configuration can be also used without the allow statements to disable all traffic to the the /api endpoint. When considering a workaround and the seriousness of the vulnerability, please consider the nature of the platform. If the platform is primarily serving public data, this vulnerability is not serious by its nature. If the platform is protecting some resources, e.g. inside private participation spaces, the vulnerability may expose some data to the attacker that is not meant public. For those who have enabled the organization setting "Force users to authenticate before access organization", the scope of this vulnerability is limited to the users who are allowed to log in to the Decidim platform. This setting was introduced in version 0.19.0 and it was applied to the /api endpoint in version 0.22.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
7.5
Decidim's comments API allows access to all commentable resources
Decidim is a participatory democracy framework. Starting in version 0.0.1 and prior to versions 0.30.5 and 0.31.1, the root level commentable field in the API allows access to all commentable resources within the platform, without any permission checks. All Decidim instances are impacted that have not secured the /api endpoint. The /api endpoint is publicly available with the default configuration. Versions 0.30.5 and 0.31.1 fix the issue. As a workaround, limit the scope to only authenticated users by limiting access to the /api endpoint. This would require custom code or installing the 3rd party module Decidim::Apiauth. With custom code, the /api endpoint can be limited to only authenticated users. The same configuration can be also used without the allow statements to disable all traffic to the the /api endpoint. When considering a workaround and the seriousness of the vulnerability, please consider the nature of the platform. If the platform is primarily serving public data, this vulnerability is not serious by its nature. If the platform is protecting some resources, e.g. inside private participation spaces, the vulnerability may expose some data to the attacker that is not meant public. For those who have enabled the organization setting "Force users to authenticate before access organization", the scope of this vulnerability is limited to the users who are allowed to log in to the Decidim platform. This setting was introduced in version 0.19.0 and it was applied to the /api endpoint in version 0.22.0.
- Record
CVE-2026-40870- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
EUVDEUVD-2026-24252
7.5
Decidim is a participatory democracy framework. Starting in version 0.0.1 and prior to versions 0.30.5 and 0.31.1, the root level commentable field in the API allows access to all commentable resources within the platform, without any permission checks. All Decidim instances are impacted that have not secured the /api endpoint. The /api endpoint is publicly available with the default configuration. Versions 0.30.5 and 0.31.1 fix the issue. As a workaround, limit the scope to only authenticated users by limiting access to the /api endpoint. This would require custom code or installing the 3rd party module Decidim::Apiauth. With custom code, the /api endpoint can be limited to only authenticated users. The same configuration can be also used without the allow statements to disable all traffic to the the /api endpoint. When considering a workaround and the seriousness of the vulnerability, please consider the nature of the platform. If the platform is primarily serving public data, this vulnerability is not serious by its nature. If the platform is protecting some resources, e.g. inside private participation spaces, the vulnerability may expose some data to the attacker that is not meant public. For those who have enabled the organization setting "Force users to authenticate before access organization", the scope of this vulnerability is limited to the users who are allowed to log in to the Decidim platform. This setting was introduced in version 0.19.0 and it was applied to the /api endpoint in version 0.22.0.
- Record
EUVD-2026-24252- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-ghmh-q25g-gxxx
7.5
Decidim's comments API allows access to all commentable resources
Impact
The root level commentable field in the API allows access to all commentable resources within the platform, without any permission checks. All Decidim instances are impacted that have not secured the /api endpoint. The /api endpoint is publicly available with the default configuration.
Patches
Not available
Workarounds
To mitigate the issue, you can limit the scope to only authenticated users by limiting access to the /api endpoint. This would require custom code or installing the 3rd party module Decidim::Apiauth.
With custom code, the /api endpoint can be limited to only authenticated users with the following code (needs to run during application initialization):
# Within your application
# config/initializers/limit_api_access.rb
module LimitApiAccess
extend ActiveSupport::Concern
included do
prepend_before_action do |controller|
unless controller.send(:user_signed_in?)
render plain: I18n.t("actions.login_before_access", scope: "decidim.core"), status: :unauthorized
end
end
end
end
Rails.application.config.to_prepare do
Decidim::Api::ApplicationController.include(LimitApiAccess)
end
Please note that this would only disable public access to the API and all authenticated users would be still able to exploit the vulnerability. This may be sufficient for some installations, but not for all.
Another workaround is to limit the availability of the /api endpoint to only trusted ranges of IPs that need to access the API. The following Nginx configuration would help limiting the API access to only specific IPs:
location /api {
allow 192.168.1.100;
allow 192.168.1.101;
deny all;
}
The same configuration can be also used without the allow statements to disable all traffic to the the /api endpoint.
When considering a workaround and the seriousness of the vulnerability, please consider the nature of the platform. If the platform is primarily serving public data, this vulnerability is not serious by its nature. If the platform is protecting some resources, e.g. inside private participation spaces, the vulnerability may expose some data to the attacker that is not meant public.
If you have enabled the organization setting "Force users to authenticate before access organization", the scope of this vulnerability is limited to the users who are allowed to log in to the Decidim platform. This setting was introduced in version 0.19.0 and it was applied to the /api endpoint in version 0.22.0.
- Record
GHSA-ghmh-q25g-gxxx- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
NVD
7.5
Decidim is a participatory democracy framework. Starting in version 0.0.1 and prior to versions 0.30.5 and 0.31.1, the root level commentable field in the API allows access to all commentable resources within the platform, without any permission checks. All Decidim instances are impacted that have not secured the /api endpoint. The /api endpoint is publicly available with the default configuration. Versions 0.30.5 and 0.31.1 fix the issue. As a workaround, limit the scope to only authenticated users by limiting access to the /api endpoint. This would require custom code or installing the 3rd party module Decidim::Apiauth. With custom code, the /api endpoint can be limited to only authenticated users. The same configuration can be also used without the allow statements to disable all traffic to the the /api endpoint. When considering a workaround and the seriousness of the vulnerability, please consider the nature of the platform. If the platform is primarily serving public data, this vulnerability is not serious by its nature. If the platform is protecting some resources, e.g. inside private participation spaces, the vulnerability may expose some data to the attacker that is not meant public. For those who have enabled the organization setting "Force users to authenticate before access organization", the scope of this vulnerability is limited to the users who are allowed to log in to the Decidim platform. This setting was introduced in version 0.19.0 and it was applied to the /api endpoint in version 0.22.0.
- Record
CVE-2026-40870- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
OSV
7.5
Decidim's comments API allows access to all commentable resources
Decidim is a participatory democracy framework. Starting in version 0.0.1 and prior to versions 0.30.5 and 0.31.1, the root level commentable field in the API allows access to all commentable resources within the platform, without any permission checks. All Decidim instances are impacted that have not secured the /api endpoint. The /api endpoint is publicly available with the default configuration. Versions 0.30.5 and 0.31.1 fix the issue. As a workaround, limit the scope to only authenticated users by limiting access to the /api endpoint. This would require custom code or installing the 3rd party module Decidim::Apiauth. With custom code, the /api endpoint can be limited to only authenticated users. The same configuration can be also used without the allow statements to disable all traffic to the the /api endpoint. When considering a workaround and the seriousness of the vulnerability, please consider the nature of the platform. If the platform is primarily serving public data, this vulnerability is not serious by its nature. If the platform is protecting some resources, e.g. inside private participation spaces, the vulnerability may expose some data to the attacker that is not meant public. For those who have enabled the organization setting "Force users to authenticate before access organization", the scope of this vulnerability is limited to the users who are allowed to log in to the Decidim platform. This setting was introduced in version 0.19.0 and it was applied to the /api endpoint in version 0.22.0.
- Record
CVE-2026-40870- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
decidim-commentsRubyGems |
Source text: > 0.31.0.rc1, < 0.31.1 | 0.31.1Not evaluated |
decidim-apiRubyGems |
Source text: > 0.31.0.rc1, < 0.31.1 | 0.31.1Not evaluated |
decidim-commentsRubyGems |
0.0.1 up to 0.30.5 | 0.30.5 |
decidim-apiRubyGems |
0.0.1 up to 0.30.5 | 0.30.5 |
Not evaluated means the source gave git commits or a range we can't read, so we can't tell which releases are affected. A fixed version beside it is the source’s own claim.
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-40870 is a high vulnerability (CVSS 7.5) in Decidim, published April 14, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.29%, the 21st percentile. Fixed in decidim-comments 0.30.5.
References
github.com/decidim/decidim/security/advisories/GHSA-ghmh-q25g-gxxx
nvd.nist.gov/vuln/detail/CVE-2026-40870
github.com/rubysec/ruby-advisory-db/blob/master/gems/decidim-api/CVE-2026-40870.yml
github.com/rubysec/ruby-advisory-db/blob/master/gems/decidim-comments/CVE-2026-40870.yml
github.com/advisories/GHSA-ghmh-q25g-gxxx
github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40870.json