# CVE-2026-40870: Decidim's comments API allows access to all commentable resources

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.41% (percentile 27, 2026-11-28)
- **CWE:** CWE-862
- **Published:** 2026-04-21T19:06:09.135Z
- **Modified:** 2026-06-17T10:45:47.900Z

## Who should check

- Anyone running decidim \> 0.31.0.rc1, \< 0.31.1; \>= 0.0.1, \< 0.30.5

## Description

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.

## Affected and fixed versions

- decidim: \> 0.31.0.rc1, \< 0.31.1; \>= 0.0.1, \< 0.30.5 (cvelist)

## Mitigation

- Upgrade decidim to 0.30.5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-40870. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-40870.md
Affected: decidim > 0.31.0.rc1, < 0.31.1; >= 0.0.1, < 0.30.5
Fixed in: decidim 0.31.1, decidim 0.30.5

Steps:
1. Search this machine and project for decidim: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-40870 being exploited?

There is no confirmed exploitation: CVE-2026-40870 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.41% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-40870?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-40870?

decidim \> 0.31.0.rc1, \< 0.31.1; \>= 0.0.1, \< 0.30.5.

### Is there a fix for CVE-2026-40870?

Yes. Fixed in decidim 0.31.1, decidim 0.30.5. Upgrade decidim to 0.30.5 or later.

### How do I check if I'm affected by CVE-2026-40870?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/decidim/decidim/security/advisories/GHSA-ghmh-q25g-gxxx>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-40870>

HTML: <https://flawdb.com/CVE-2026-40870> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-40870>
