Skip to content

Filenames not escaped by default in controllers using DownloadResponse

Low
LukasReschke published GHSA-3hjp-26x8-mhf6 Jul 12, 2021

Package

Nextcloud Server

Affected versions

< 19.0.13, < 20.0.11, < 21.0.3

Patched versions

19.0.13, 20.0.11, 21.0.3

Description

Impact

Filenames where not escaped by default in controllers using DownloadResponse. When a user-supplied filename was passed unsanitized into a DownloadResponse, this could be used to trick users into downloading malicious files with a benign file extension.

This would show in UI behaviours where Nextcloud applications would display a benign file extension (e.g. JPEG), but the file will actually be downloaded with an executable file extension. (e.g. EXE)

Patches

It is recommended that the Nextcloud Server is upgraded to 19.0.13, 20.0.11 or 21.0.3

Workarounds

  • As an administrator of a Nextcloud instance there is no known workaround.
  • As an developer of a Nextcloud app, you can manually escape the filename before passing it into DownloadResponse.

References

For more information

If you have any questions or comments about this advisory:

Severity

Low

CVE ID

CVE-2021-32679

Weaknesses

Credits