Skip to content
DoS Disclosed report Beginner

Uploading large avatar images cause excessive CPU usage

Uploading a large avatar image caused a php-fpm process to run at 100% CPU indefinitely, and repeating the upload could exhaust all processes and overload the server. An attacker could use this to make the server stop responding to requests.

fancycode Follow

Originally disclosed on HackerOne

  • Paid in 4 months
  • Disclosed after 4 months

How to reproduce:

  • Create an account on any server running Nextcloud 13 or 14.
  • Open the personal settings.
  • Upload a large image as avatar (tested with a 4032x3024 PNG image of about 14.5 MB).
  • Keep the selected area in the popup and save the avatar.
  • Notice that the avatar area shows the spinner and doesn't show the avatar.
  • One of your php-fpm processes on the server runs with 100% CPU.
  • Reload the browser and the avatar is visible - the php-fpm process is still at 100% CPU.
  • Repeat uploading the image as avatar until all php-fpm processes are at 100% CPU or the server is completely overloaded.
  • This doesn't resolve itself even after a couple of minutes.

This applies to Nextcloud 13 and 14. The issue is fixed in Nextcloud 15 and the fix should be backported to all supported versions of Nextcloud.

The cause for the issue is the 3rdparty VCard code that splits the property values at 75 characters, the fix for Nextcloud 15 is here: https://github.com/nextcloud/3rdparty/commit/085494c2ad5c3757f9f1c11945f786d63fb2d40f#diff-0d23de9452f6235135a046b1011b5c30

Impact

An attacker could completely overload a server, cause it to stop responding to any more requests.

The original report as published on HackerOne, by fancycode. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the 3rdparty VCard code splits property values at 75 characters, causing an infinite loop when processing large avatar images.

Impact

An attacker could completely overload a server, causing it to stop responding to any more requests.

What the attacker needed

A free account; Nextcloud 13 or 14

The fix

The issue was fixed in Nextcloud 15 and should be backported to all supported versions.

How it was found

  1. Create an account on a Nextcloud 13 or 14 server.
  2. Open personal settings.
  3. Upload a large image as avatar.
  4. Keep the selected area and save the avatar.
  5. Observe the spinner and a php-fpm process at 100% CPU.
  6. Repeat until all php-fpm processes are at 100% CPU.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Uploading a large avatar image made one worker use all its CPU and not finish. Repeating this could use up all workers, so the server can no longer respond.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by fancycode

View all

1 more disclosed report, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.