CVE-2021-32802

Preview generation used third-party library not suited for user-generated content in Nextcloud server

CRITICAL
9.8
CVSS Score
Published: September 7, 2021 at 09:45 PM UTC
Updated: June 17, 2026 at 03:53 AM UTC
1 product affected across 1 vendorNextcloud/server

Using security-advisories by nextcloud?

Get instant alerts when new vulnerabilities affect security-advisories - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
CRITICAL9.8
Exploit prediction
EPSS 3%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 20.0.1221.0.0 ≤ v < 21.0.422.0.0 ≤ v < 22.1.0
Affected range stops below 20.0.12, so it looks safe — our inference, not a vendor statement
Affected range stops below 21.0.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 22.1.0, so it looks safe — our inference, not a vendor statement

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-829

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card