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

Critical 9.3 Published Updated

Nextcloud server allows attackers to trigger SSRF, file disclosure, or code execution via unsafe third-party library usage during image preview generation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-32802?

CVE-2021-32802 is a critical server-side request forgery vulnerability in Nextcloud Nextcloud Server, published on 7 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-829

Which versions are affected by CVE-2021-32802?

It affects 1 product.

Products include Nextcloud Nextcloud Server.

How do I fix CVE-2021-32802?

Upgrade to a fixed version.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2021-32802 being exploited?

There is no known exploitation of CVE-2021-32802 in the wild and no public exploit code.

All Nextcloud Nextcloud Server vulnerabilities

Sources

Also known as GHSA-m682-v4g9-wrq7.

Is CVE-2021-32802 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free