# CVE-2021-32802: Preview generation used third-party library not suited for user-generated content in Nextcloud server

- Severity: Critical 9.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.60%, higher than 86% of CVEs (2026-11-30)
- Published: 2021-09-07T21:45:11.000Z
- Modified: 2026-06-17T03:53:39.467Z
- Weaknesses: CWE-829
- Assigned by: GitHub_M

## 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`.

(As written by CVE List.)

## Affected

- nextcloud security-advisories: < 20.0.12; >= 21.0.0, < 21.0.4; >= 22.0.0, < 22.1.0
- nextcloud nextcloud_server: before 20.0.12; from 21.0.0 before 21.0.4; from 22.0.0 before 22.1.0

## Every score

- GitHub_M: CVSS:3.1 9.3 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 10.0 High `AV:N/AC:L/Au:N/C:C/I:C/A:C`

## References

- <https://github.com/nextcloud/security-advisories/security/advisories/GHSA-m682-v4g9-wrq7> (mitigation, third-party-advisory)
- <https://hackerone.com/reports/1261413> (permissions-required, third-party-advisory)
- <https://docs.nextcloud.com/server/21/admin_manual/configuration_files/previews_configuration.html#disabling-previews> (vendor-advisory)
- <https://security.gentoo.org/glsa/202208-17> (third-party-advisory, vendor-advisory)

## Sources

- CVE List: [CVE-2021-32802](https://www.cve.org/CVERecord?id=CVE-2021-32802), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-32802](https://nvd.nist.gov/vuln/detail/CVE-2021-32802), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-32802 · Whole record: https://cve.day/CVE-2021-32802.json · Rebuilt by cve.day 2026-11-25T22:58:03.700Z
