Skip to content
DoS Write-up Beginner

Long String DoS

Sending a very long string (around 100,000 characters) into fields such as a password or username caused the server to return a 500 error, likely because string hashing exhausted CPU and memory. An attacker could make the site unavailable or unresponsive.

Shrey Shah Follow

Published on medium.com

Bounty$100 View original

{{media:0}}

Shrey Shah (Jerry), on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This write-up describes an application level denial of service caused by submitting a very long string to a form field. The researcher found it on a private program on HackerOne, while creating an account. The report does not name the program or the target host; the example URL used in the steps is a placeholder, https://privateprogram.com/signup.

The feature involved is ordinary account handling: the signup form and, later, the password reset flow. Both accept a password value from the user and pass it to the server for processing. The report does not describe the rest of the application or the technology stack.

Setup

No special tooling is described. The researcher used a browser against the signup page of the private program, and a temporary email address service (temp-mail) is suggested for the variants that need a fresh email address. The only precondition is an account creation or password reset form that accepts a password field.

Finding it

The researcher's summary is that sending a very long string of 100000 characters can cause a denial of service on the server, making the website unavailable or unresponsive. The stated cause is a vulnerable string hashing implementation: when a long string is sent, the hashing process results in CPU and memory exhaustion.

The method used to detect the issue was to send strings of various lengths and compare the measured response times. A long input that produces a disproportionate delay, or an error, is the signal.

On the private program, the researcher was creating an account and used a long password string for testing. The application returned a 500 Internal Server Error, which confirmed the behaviour.

Exploitation

Step 1: Open the signup page

HTTP
https://privateprogram.com/signup

This is the account creation form of the target. The report uses a placeholder host here; the real host is not disclosed.

Step 2: Fill the form with a long string in the password field

The researcher entered a long string, described in the summary as 100000 characters, into the password input and submitted the form.

Image for post
Long String From the original on medium.com

The screenshot shows the signup form with the long string entered in the password field.

Step 3: Submit and observe the response

Text
500 Internal Server Error

The researcher notes that a 500 response is what you get if the target is vulnerable. The researcher notes that this is what you get if the target is vulnerable.

Image for post
Server Crash From the original on medium.com

The screenshot shows the server error returned after the long string was submitted.

Step 4: Try the password reset flow instead

The signup page is often not vulnerable, so the researcher recommends trying the same long string while resetting a password. In this case the signup attempt was not the successful one: the researcher found the issue on resetting the password, and that attempt succeeded.

The screenshot shows the password reset flow being used with the long string.

After the successful reproduction, the researcher reported it to the company and received a bounty of 100 USD.

Image for post
Image for post From the original on medium.com

Root cause

The report attributes the behaviour to a vulnerable string hashing implementation. Password values are normally passed through a hashing function before storage or comparison; if that function, or the code around it, handles very long input badly, the work done per request grows with the input length and consumes CPU and memory until the request fails. The report does not identify the specific library or function.

The application accepted the long value and returned a 500 error.

Impact

By sending a very long string, an attacker can cause a denial of service on the server. This may lead to the website becoming unavailable or unresponsive. The report frames this as an application level DoS, distinct from a network level DoS.

The researcher also describes a second scenario, using a username rather than a password: with two accounts on a social media style site, account A is given a username of 1000 characters, and account B searches for account A. Two outcomes are possible: the search keeps running for a long time, or the application crashes with a 500 error code. This illustrates that the same weakness can appear wherever user supplied strings are processed, not only in password fields.

Fix

Variants to test

The researcher lists places where the same long string can be tried, beyond the password field:

  1. Username
  2. Firstname or Lastname
  3. Email Address (create your own email using temp-mail)
  4. Address
  5. Text-Area
  6. Comment Section

and many more.

A positive result looks like a 500 Internal Server Error. The response time comparison across several string lengths is the detection method the researcher used. If the signup page does not show the behaviour, try the password reset flow, which is where this report's reproduction succeeded.

One reporting note from the researcher: this DoS falls under Application Level DoS and not Network Level DoS, so it can be reported. Some companies list "Denial of Service" as out of scope, which in their policy means network level DoS rather than application level DoS. If a company states that "Any kind of DoS" is out of scope, then neither can be reported.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher was testing a website that was part of a private bug bounty program on HackerOne. A bug bounty program is a scheme where a company invites people to look for security problems in its systems and pays them for reporting what they find. A private program is one you can only join by invitation, so the researcher could not name the company publicly.

While creating an account on that site, the researcher typed a very long password, about 100000 characters, into the password box and submitted the form. Instead of a normal reply, the website returned an error page: a 500 Internal Server Error. That error means the server tried to do its job and failed. The researcher took the 500 error as confirmation that the site was vulnerable.

The kind of problem is called a denial of service, or DoS. In everyday terms, imagine a shop assistant who is asked to read out a customer's name, and the customer hands over a name that is a thousand pages long. The assistant is not harmed, but they are stuck reading for a very long time and cannot serve anyone else. A DoS is the same idea applied to a website: one request keeps the server so busy that other visitors get slow or broken pages.

Shrey Shah (Jerry)
Shrey Shah (Jerry) From the original on medium.com

The image above is the header of the researcher's write-up, credited to Shrey Shah (Jerry).

The feature involved

The researcher was using ordinary account handling: the signup form, where you choose a username and password, and later the password reset flow, where you ask the site to let you set a new password. Both of these forms take a password value from you and send it to the server.

A server is the computer that runs the website. Your browser is the client: it shows the pages and sends your input. When you press a button on a form, the browser packages what you typed and sends it to the server, which processes it and sends back a result. Most of the time the result is a normal page. Sometimes it is an error code, which is a short number the server uses to say what happened. 500 means the server hit an unexpected problem of its own.

Setting up

No special tools were needed. The researcher used a browser, the same kind of program you are reading this in, pointed at the signup page of the private program. For some of the variations described later, the researcher suggests using a temporary email service (temp-mail), which gives you a throwaway email address so you can create test accounts without using your real inbox.

The only thing you need to try this yourself is a form that accepts a password, on a site you are allowed to test.

Finding it

The researcher's summary is that sending a very long string of 100000 characters can cause a denial of service on the server, which may make the website unavailable or unresponsive. A string, in computing, just means a sequence of characters: letters, digits, symbols, all treated as one piece of text.

The stated cause is a vulnerable string hashing implementation. Hashing is a one way scrambling step: a program takes your password and turns it into a fixed looking jumble, so the site can store or compare it without keeping your actual password. A good hashing function is designed to take a predictable amount of effort for normal passwords. If the code around it handles very long input badly, the effort grows with the length of the input, and the server burns CPU time and memory until the request fails. CPU is the part of the computer that does the calculating; memory is the workspace it uses while calculating. Exhausting both is like asking someone to do a huge sum on a tiny notepad: they run out of room and time.

The detection method was simple: send strings of various lengths and compare how long the server takes to answer. If a longer input produces a much longer wait, or an error, that is the signal. You do not need to understand the server's code to notice that pattern; you only need to watch the response.

On the private program, the researcher was creating an account and used a long password string for testing. The application returned a 500 Internal Server Error, which confirmed the behaviour.

Trying it, step by step

Step 1: Open the signup page

HTTP
https://privateprogram.com/signup

This line is a URL, the address you type into your browser's address bar. https:// is the secure version of the web protocol; privateprogram.com is a placeholder host name, not the real company, because the program was private; /signup is the path to the account creation page. Opening it in a browser shows the form where a new user picks a username and password.

Step 2: Fill the form with a long string in the password field

The researcher entered a long string, described in the summary as 100000 characters, into the password input and submitted the form. A character is a single letter, digit or symbol, so 100000 characters is roughly a hundred pages of plain text pasted into one box.

Image for post
Long String From the original on medium.com

The screenshot shows the signup form with the long string entered in the password field. The caption under it reads "Long String".

Why do this in the password box? Because the password is one of the few values a site must process carefully on the server, and it is easy to reach without an account. You are not trying to guess anyone's password; you are testing whether the site copes with an unusually large value.

Step 3: Submit and observe the response

Text
500 Internal Server Error

This is the status line the server sent back. The number 500 belongs to a family of codes: codes starting with 4 mean the request was wrong (for example, a page that does not exist), and codes starting with 5 mean the server itself failed. Internal Server Error is the standard wording for 500. Seeing it after submitting a long value tells you the input was not handled safely: the server accepted it, tried to process it, and fell over instead of politely rejecting it.

Image for post
Server Crash From the original on medium.com

The screenshot shows the server error returned after the long string was submitted. The caption reads "Server Crash".

Step 4: Try the password reset flow instead

The signup page is often not vulnerable, so the researcher recommends trying the same long string while resetting a password. In this case the signup attempt was not the successful one: the researcher found the issue on resetting the password, and that attempt succeeded.

The screenshot shows the password reset flow being used with the long string. The caption reads "Resetting Password using Long String".

Why try a second form? Different pages are often built by different teams or at different times, and they may not share the same checks. A site that guards its signup page may forget to guard the reset page, even though both end up handling a password.

After the successful reproduction, the researcher reported it to the company and received a bounty of 100 USD.

Image for post
Image for post From the original on medium.com

The final image is the researcher's closing note about the bounty.

Why it happens

The report attributes the behaviour to a vulnerable string hashing implementation. Passwords are normally passed through a hashing function before storage or comparison. If that function, or the code around it, handles very long input badly, the work done per request grows with the input length and consumes CPU and memory until the request fails. The report does not identify the specific library or function.

The application accepted the long value and returned a 500 error. The report does not say whether any length limit existed on the client side.

What an attacker could do with it

By sending a very long string, an attacker can cause a denial of service on the server. This may lead to the website becoming unavailable or unresponsive. The report frames this as an application level DoS, distinct from a network level DoS. The difference matters: a network level DoS floods the connection itself, like blocking the road to a shop, while an application level DoS uses the shop's own procedures against it, like the thousand page name.

The researcher also describes a second scenario, using a username rather than a password. With two accounts on a social media style site, account A is given a username of 1000 characters, and account B searches for account A. Two outcomes are possible: the search keeps running for a long time, or the application crashes with a 500 error code. This illustrates that the same weakness can appear wherever user supplied strings are processed, not only in password fields.

The fix

The report does not state what the company changed. In plain terms: decide how long a password or username may be, check that at the door, and turn away anything longer with a clear message.

Other places to try the same idea

The researcher lists places where the same long string can be tried, beyond the password field:

  1. Username
  2. Firstname or Lastname
  3. Email Address (create your own email using temp-mail)
  4. Address
  5. Text-Area
  6. Comment Section

and many more.

A positive result looks like a 500 Internal Server Error. Comparing response times across several string lengths is the detection method the researcher used. If the signup page does not show the behaviour, try the password reset flow, which is where this report's reproduction succeeded.

One reporting note from the researcher: this DoS falls under Application Level DoS and not Network Level DoS, so it can be reported. Some companies list "Denial of Service" as out of scope, which in their policy means network level DoS rather than application level DoS. If a company states that "Any kind of DoS" is out of scope, then neither can be reported. Out of scope means the company has said it will not accept reports about that topic, so sending one wastes your time and theirs.

Glossary

  • Bug bounty program: a scheme where a company pays people for reporting security problems in its systems.
  • Private program: a bounty program you can only join by invitation, so its details are not public.
  • HackerOne: the platform that hosted the private program in this report.
  • Server: the computer that runs a website and processes what visitors send.
  • Client: the program on your side, usually a browser, that sends requests and shows results.
  • Browser: the program you use to open web pages.
  • URL: the address of a page, such as https://privateprogram.com/signup.
  • Host: the name of the machine a URL points to, here a placeholder rather than the real company.
  • Form: the part of a page with boxes you fill in and a button to send them.
  • Signup: the process of creating a new account.
  • Password reset flow: the series of pages that lets you set a new password when you have forgotten the old one.
  • String: a sequence of characters treated as one piece of text.
  • Character: a single letter, digit or symbol.
  • Status code: a short number a server sends back to say what happened, such as 500.
  • 500 Internal Server Error: the code meaning the server hit an unexpected problem of its own.
  • Denial of service (DoS): making a service unavailable or unresponsive, usually by giving it more work than it can handle.
  • Application level DoS: a DoS that abuses the website's own features, such as a form field.
  • Network level DoS: a DoS that floods the connection itself rather than using the website's features.
  • Hashing: a one way scrambling step that turns a value such as a password into a fixed looking jumble.
  • String hashing implementation: the code that performs hashing on text, which the report names as the cause here.
  • CPU: the part of a computer that performs calculations.
  • Memory: the workspace a computer uses while it is calculating.
  • Exhaustion: running out of a resource such as CPU time or memory.
  • Response time: how long the server takes to answer a request.
  • Input validation: checking what a user typed before using it, for example rejecting values that are too long.
  • Boundary: the point where input first enters the application, where checks should happen.
  • Out of scope: a topic a company has said it will not accept reports about.
  • Bounty: the money paid for a valid report.
  • Temp-mail: a service that gives you a temporary email address for testing.
  • Placeholder: a stand-in name or address used in a write-up so the real one stays private.

More by Shrey Shah

View all

6 more disclosed reports, best first.

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.