CVE-2026-40870
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedDecidim 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThis is an IDOR/authorization bypass vulnerability in Decidim's REST API where the root-level `commentable` field exposes all commentable resources without any permission checks. The `/api` endpoint is publicly accessible by default, allowing unauthenticated attackers to access potentially sensitive data within private participation spaces.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Confirm REST API is enabledInspect the Decidim initialization configuration (config/initializers/decidim.rb) or environment variables for the REST API feature flagAffected if The REST API is enabled and the /api endpoint is routing requests
-
Test /api endpoint unauthenticated accessSend an HTTP GET request to /api (or /api/v1) without any authentication headers and observe whether the endpoint returns a successful responseAffected if The endpoint responds with 200 OK or exposes data without requiring authentication
-
Verify organization authentication settingQuery the organizations database table or inspect the Decidim admin panel for the 'force_users_to_authenticate_before_access_organization' settingAffected if This setting is disabled or absent, allowing anonymous access to the API
-
Check if Apiauth module is installedInspect the Gemfile for the decidim-apiauth gem or check config/routes.rb for the Decidim::Apiauth module inclusionAffected if The Apiauth module is not present in the application
-
Review API endpoint permissions on commentable resourcesMake a request to the /api endpoint and examine the response for the root-level 'commentable' field, noting whether it exposes resources from private participation spacesAffected if The response contains a 'commentable' field exposing resources without permission checks
The environment is affected if the /api endpoint is publicly accessible without authentication and returns data through the unprotected commentable field.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedRestrict access to the `/api` endpoint to authenticated users only by installing the Decidim::Apiauth module, applying custom authorization code, or enabling the organization setting 'Force users to authenticate before access organization' (available since v0.22.0).
Decidim version 0.31.1 (latest fixed release)
- Upgrade Decidim to version 0.30.5 or 0.31.1 to resolve the missing authorization vulnerability in the `/api` endpoint
- After upgrading, verify that the commentable resources now properly enforce permission checks
- If immediate upgrade is not possible, implement a workaround by restricting `/api` endpoint access to authenticated users only using custom code or by installing the Decidim::Apiauth module
- If the platform only serves public data, consider whether the default public access is acceptable based on your organization's security requirements
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation3.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,272.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-40870 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-40870 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data