CVE-2023-51447
Decidim vulnerable to cross-site scripting (XSS) in the dynamic file uploads
Check your servers for CVE-2023-51447
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-51447 affects decidim, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.49%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 43.9% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 21 Feb 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-79 Improper Neutralization of Input During Web Page Generation
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of decidim and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i decidim
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-51447 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-51447RHEL, Rocky, Alma, Fedora
rpm -q decidim
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-51447Alpine
apk list --installed | grep -i decidimWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-51447
trivy image --scanners vuln IMAGE | grep CVE-2023-51447
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/decidim/decidim/pull/11612 github.com
- https://github.com/decidim/decidim/commit/aaf72787cf18beeeb6a771c1f7cbb7654b073423 github.com
- https://github.com/decidim/decidim/releases/tag/v0.27.5 github.com
- https://github.com/decidim/decidim/releases/tag/v0.28.0 github.com
- https://github.com/rails/rails/blob/a967d355c6fee9ad9b8bd115d43bc8b0fc207e7e/activestorage/app/controllers/active_storage/direct_uploads_controller.rb#L14 github.com
Source: the record CVE-2023-51447 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse