What’s Vulnerable › Vulnerabilities
CVE-2021-32802: Preview generation used third-party library not suited for user-generated content in Nextcloud server
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-09-07 · updated 2026-06-17
- Weakness: CWE-829
Description
Nextcloud server is an open source, self hosted personal cloud. Nextcloud supports rendering image previews for user provided file content. For some image types, the Nextcloud server was invoking a third-party library that wasn't suited for untrusted user-supplied content. There are several security concerns with passing user-generated content to this library, such as Server-Side-Request-Forgery, file disclosure or potentially executing code on the system. The risk depends on your system configuration and the installed library version. It is recommended that the Nextcloud Server is upgraded to 20.0.12, 21.0.4 or 22.1.0. These versions do not use this library anymore. As a workaround users may disable previews by setting `enable_previews` to `false` in `config.php`.
Affected products
- Nextcloud Server: before 20.0.12; from 21.0.0 before 21.0.4; from 22.0.0 before 22.1.0 — fixed in 20.0.12, 21.0.4, 22.1.0
How to fix
Upgrade to a fixed version: Nextcloud Server 20.0.12, 21.0.4, 22.1.0. Check the vendor advisory for mitigations.
References
- https://docs.nextcloud.com/server/21/admin_manual/configuration_files/previews_configuration.html#disabling-previews
- https://github.com/nextcloud/security-advisories/security/advisories/GHSA-m682-v4g9-wrq7
- https://hackerone.com/reports/1261413
- https://security.gentoo.org/glsa/202208-17
- https://docs.nextcloud.com/server/21/admin_manual/configuration_files/previews_configuration.html#disabling-previews
- https://github.com/nextcloud/security-advisories/security/advisories/GHSA-m682-v4g9-wrq7
- https://hackerone.com/reports/1261413
- https://security.gentoo.org/glsa/202208-17
Get alerted when CVE-2021-32802 or the next vulnerability affects your stack