# CVE-2023-51447: Decidim vulnerable to cross-site scripting (XSS) in the dynamic file uploads

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

- **Severity:** MEDIUM 6.3
- **CVSS:** 6.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.70% (percentile 48, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** GHSA-9w99-78rj-hmxq
- **Published:** 2024-02-20T17:29:35.677Z
- **Modified:** 2026-06-17T06:40:58.690Z

## Who should check

- Projects that depend on RubyGems package decidim (\>= 0.27.0, \< 0.27.5)
- Projects that depend on RubyGems package decidim-core (\>= 0.27.0, \< 0.27.5)
- Anyone running decidim \>= 0.27.0, \< 0.27.5

## Description

Decidim is a participatory democracy framework. Starting in version 0.27.0 and prior to versions 0.27.5 and 0.28.0, the dynamic file upload feature is subject to potential cross-site scripting attacks in case the attacker manages to modify the file names of the records being uploaded to the server. This appears in sections where the user controls the file upload dialogs themselves and has the technical knowledge to change the file names through the dynamic upload endpoint. Therefore I believe it would require the attacker to control the whole session of the particular user but in any case, this needs to be fixed. Successful exploit of this vulnerability would require the user to have successfully uploaded a file blob to the server with a malicious file name and then have the possibility to direct the other user to the edit page of the record where the attachment is attached. The users are able to craft the direct upload requests themselves controlling the file name that gets stored to the database. The attacker is able to change the filename e.g. to \`\<svg onload=alert('XSS')\>\` if they know how to craft these requests themselves. And then enter the returned blob ID to the form inputs manually by modifying the edit page source. Versions 0.27.5 and 0.28.0 contain a patch for this issue. As a workaround, disable dynamic uploads for the instance, e.g. from proposals.

## Affected and fixed versions

- RubyGems `decidim`: affected \>= 0.27.0, \< 0.27.5; fixed 0.27.5 (osv)
- RubyGems `decidim-core`: affected \>= 0.27.0, \< 0.27.5; fixed 0.27.5 (osv)
- decidim: \>= 0.27.0, \< 0.27.5 (cvelist)

## Mitigation

- Upgrade decidim to 0.27.5 or later.
- Upgrade decidim-core to 0.27.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-2023-51447. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-51447.md
Affected: decidim >= 0.27.0, < 0.27.5; decidim-core >= 0.27.0, < 0.27.5
Fixed in: 0.27.5

Steps:
1. Search this machine and project for decidim (RubyGems), decidim-core (RubyGems), 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-2023-51447 being exploited?

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

### How serious is CVE-2023-51447?

Medium: CVSS 6.3 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2023-51447?

decidim \>= 0.27.0, \< 0.27.5; decidim-core \>= 0.27.0, \< 0.27.5.

### Is there a fix for CVE-2023-51447?

Yes. Fixed in 0.27.5. Upgrade decidim to 0.27.5 or later. Upgrade decidim-core to 0.27.5 or later.

### How do I check if I'm affected by CVE-2023-51447?

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-9w99-78rj-hmxq>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-51447>
- patch: <https://github.com/decidim/decidim/pull/11612>
- patch: <https://github.com/decidim/decidim/commit/aaf72787cf18beeeb6a771c1f7cbb7654b073423>
- other: <https://github.com/decidim/decidim/releases/tag/v0.27.5>
- other: <https://github.com/decidim/decidim/releases/tag/v0.28.0>
- other: <https://github.com/rails/rails/blob/a967d355c6fee9ad9b8bd115d43bc8b0fc207e7e/activestorage/app/controllers/active_storage/direct_uploads_controller.rb#L14>
- other: <https://github.com/decidim/decidim>

## 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-2023-51447>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-9w99-78rj-hmxq> (license: <https://creativecommons.org/licenses/by/4.0/>)

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