User input validation can lead to DOS
The phone number field on the account completion page lacked a length limit, so submitting an oversized value caused the backend to return a 503 Service Temporarily Unavailable error. An attacker could use this to cause a denial of service.
- Triaged in 21 hours
- Fixed in 3 months
- Paid in 33 days
- Disclosed after 3 months
Hi Security Team,
Summary: There is no limit to the number of characters on phone numbers and using this you can perform a DOS Attack
Description: On the input form of phone number in https://twitter.com/account/complete there's no Input validation using this you can send more payload and may cause of Denial of service or 503 Service Temporarily Unavailable
Steps To Reproduce:
So this is the normal page █████████
Input this payload on the Phone number textbox ████ then submit as you can see the payload was encoded on backend so the payload may load more
████
After submitting this is the response on burp 503 Service Temporarily Unavailable
█████████
And on the page this is the result .
████████
Supporting Material/References:
- payload.txt
Thank you! Regards
Impact
Attacker can perform a DOS because of lack of input validation
What the report shows
The target is the phone number field on the account completion form at https://twitter.com/account/complete, part of the *.twitter.com asset. The researcher reports that the field places no limit on the number of characters accepted, and that submitting an oversized value can push the backend into a denial of service, observed as a 503 Service Temporarily Unavailable response.
The steps are short:
- Open the normal account completion page and locate the phone number textbox.
- Enter an oversized payload into the phone number field and submit the form.
- Observe that the payload is encoded on the backend, so the submitted value may expand further.
- Observe the response in Burp:
503 Service Temporarily Unavailable. - Observe the same failure reflected on the page itself.
The report references a supporting file, payload.txt, but the payload itself is not reproduced in the text. The exact string sent to the field is therefore not available here; the report only describes it as a long value that is encoded server side.
The report was rated medium severity with the weakness "Uncontrolled Resource Consumption", and a bounty of 560.00 USD was awarded. It was disclosed on 2020-03-26. The report does not describe a fix.
Root cause
The report points to missing input validation on the phone number field: no cap on the number of characters accepted. The report suggests the oversized value is encoded on the backend, so the payload may load more, but does not establish the mechanism behind the 503. The report does not identify which component failed or how the encoding step contributes, so the precise resource that was exhausted is not established.
Impact
As the report puts it, an attacker can perform a denial of service because of the lack of input validation. The observed effect is a 503 Service Temporarily Unavailable response. The report does not quantify how long the outage lasted, how many requests were needed, or whether other users were affected, so the practical scope of the denial is not shown.
How this kind of bug works
Uncontrolled resource consumption covers any case where user supplied input determines how much CPU, memory, disk, connection state or downstream work the server commits, without an upper bound. Length is the simplest vector: a field that is expected to hold a short value, such as a phone number, is instead allowed to carry an arbitrarily large string. The server then copies it, encodes it, stores it, passes it to a parser, or forwards it to another service, and each of those steps costs resources proportional to the input size.
Encoding steps are a common amplifier. If the input is transformed before storage or transport, the transformed value can be larger than what was sent, so a single request can commit more work than its own size suggests. Repeated submissions multiply the effect, and if the expensive path is reachable without authentication or rate limiting, a small number of clients can exhaust a shared worker pool or memory budget.
The general defences are bounds and backpressure: validate that the value matches the expected format, enforce a maximum length at the edge and again in the application, reject rather than truncate where the format matters, cap the size of any encoded or expanded representation, and apply rate limiting so that repeated expensive requests are throttled before they reach the costly code path.
How to test for it
Look for fields whose expected value is short and structured: phone numbers, postal codes, country or currency codes, verification codes, coupon codes, and any field that is later encoded, normalised or forwarded to another system. Account setup and profile forms are good candidates because they are often written quickly and validated only on the client.
A practical method:
- Submit a normal value and record the response, its timing and the server side behaviour.
- Submit progressively longer values of the same character class, increasing by an order of magnitude each time, and watch response time, response size and status codes.
- Note whether the value is transformed: compare what you sent with what comes back in the response or in any later page that displays it. Expansion during encoding is a signal that the server is doing work proportional to your input.
- Test whether the field is validated on the client only, by removing any
maxlengthattribute or replaying the request directly with a proxy. - If a single large value causes errors, check whether a small number of repeats makes the effect persist, and whether other requests to the same host start failing.
A positive result looks like a measurable, repeatable change: latency that scales with input size, error responses such as 5xx codes, or a period where unrelated requests to the same service fail. A single 500 on one malformed value is weak evidence; the report needs to show that the resource is actually consumed and that the effect is not just a rejected request.
Common false positives: the server rejects the oversized value with a 4xx and no measurable cost; the delay is client side rendering of a long string; the 5xx comes from a shared dependency that is already unstable; or the effect requires so many requests that it is indistinguishable from ordinary load. Always retest at a quiet time and compare against a baseline.
How it is fixed
Enforce a maximum length on the server for every field, independent of any client side attribute, and validate that the value matches the expected format for a phone number. Cap the size of any encoded or expanded representation before it is stored or forwarded. Apply request size limits at the reverse proxy or application server so oversized bodies are refused early. Add rate limiting and, where the operation is expensive, queueing with a bounded worker pool so that a burst degrades gracefully instead of returning 503s to everyone. Monitor error rates and latency per endpoint so that a regression in one form is visible quickly.
Hunting notes
This class tends to hide in secondary forms: account completion, recovery flows, profile settings, invitation and referral codes, and any field that feeds a downstream API or a template. Recon signals include forms with client side only validation, fields with a maxlength attribute but no server side counterpart, endpoints that echo the submitted value back encoded, and services that sit behind a shared gateway where one slow path can affect many routes.
To make the report land, show the mechanism rather than a single error: a baseline, a scaling series, the exact request, the response, and evidence that the effect is repeatable and affects availability rather than only your own session. Keep the payload minimal and describe what the server does with it. If the effect is only a transient error on one request, say so plainly; programs accept resource consumption reports when the consumption is demonstrated, not inferred.
What happened, in plain words
Twitter has a page where a new user finishes setting up their account, at https://twitter.com/account/complete. One of the fields on that page asks for a phone number. The researcher found that this field does not check how long the value is: you can type in a very long string instead of a phone number, and the site accepts it.
When that oversized value is submitted, the server behind the page does extra work on it (the report says the value is encoded on the backend, meaning the server transforms it into another form before using it). That extra work was enough to make the service stop responding properly, and it returned a 503 Service Temporarily Unavailable error. A 503 is the standard web response for "the server is there but cannot handle your request right now". In other words, the researcher reports that a very long value can cause the service to return a 503. That is a denial of service: making a service unavailable to the people who need it, rather than stealing data from it.
The report was rated medium severity, filed under the weakness "Uncontrolled Resource Consumption", and a bounty of 560.00 USD was paid. It was disclosed on 2020-03-26.
The steps, one by one
- Open the normal page. The researcher first loaded the account completion form and found the phone number textbox. This matters because you need to know what a normal, working submission looks like before you can tell that something abnormal has happened.
- Enter an oversized payload and submit. A payload here just means the value you put into the field. Instead of something like a phone number, the researcher sent a very long string. The report refers to a supporting file,
payload.txt, but the exact string is not shown in the text, so the precise value used is not available. - Notice the value is encoded on the backend. Encoding means the server converts the text into another representation (for example, escaping special characters so the value can be stored or passed along safely). The researcher's point is that the payload was encoded on the backend, so it may load more.
- See the response in Burp. Burp is a tool that sits between your browser and the website and lets you read the raw requests and responses. The response observed was:
503 Service Temporarily Unavailable
- See the same failure on the page. The researcher also shows the result on the page itself.
Why it matters
A phone number field is supposed to hold a short, structured value. If the server never checks the length or the format, then whatever a visitor types becomes work for the server. Normally that work is tiny. With a huge value it is not, and the report shows the result: the service returned a 503 instead of processing the form. The report does not say how long the outage lasted, how many requests were needed, or whether other users were affected, so the full practical scope is not shown. It also does not describe a fix.
In general, how this kind of bug works
Uncontrolled resource consumption is the general name for a family of bugs where user input decides how much of something the server spends: processor time, memory, disk space, open connections, or work passed on to another system. The key word is uncontrolled: there is no upper limit, so the cost grows with whatever the visitor sends.
A useful everyday comparison is a photocopier with no page limit. If the machine is meant for one-page forms, nobody minds. If someone feeds in a thousand pages, the queue behind them waits, and eventually the machine jams. The copier did nothing wrong; it simply had no rule about how much it would accept.
Length is the simplest way to exploit this. A field meant for a short value is allowed to carry an arbitrarily long one. The server then copies it, encodes it, stores it, hands it to a parser, or forwards it to another service, and each of those steps costs more as the input grows. Encoding steps are a common amplifier: if the server transforms the value before using it, the transformed version can be larger than what was sent, so one request can commit more work than its own size suggests. Repeat the request and the effect multiplies, especially if the expensive path can be reached without logging in and without rate limiting.
The usual defences are limits and backpressure. Check that the value matches the expected format, enforce a maximum length on the server (not only in the browser), reject rather than silently truncate where the format matters, cap the size of any encoded or expanded version, and throttle repeated expensive requests before they reach the costly code.
How to test for it
Look for fields whose expected value is short and structured: phone numbers, postal codes, verification codes, coupon codes, and anything later encoded, normalised or forwarded to another system. Account setup and profile forms are good candidates because they are often written quickly and checked only in the browser.
- Submit a normal value and note the response, how long it took, and what the server did.
- Submit progressively longer values, increasing by roughly ten times each round, and watch response time, response size and status codes.
- Compare what you sent with what comes back, or with what a later page displays. If the value grows during encoding, the server is doing work proportional to your input.
- Check whether the check is browser-only: remove any
maxlengthattribute on the field, or replay the request directly with a proxy tool. - If one large value causes errors, try a small number of repeats and see whether other requests to the same host start failing too.
A convincing result is measurable and repeatable: latency that scales with input size, 5xx error responses, or a period where unrelated requests to the same service fail. A single error on one odd value is weak evidence, because it may just be a rejected request. Common false positives include the server rejecting the value cleanly with a 4xx and no real cost, a delay caused by your own browser rendering a long string, an unrelated dependency that was already unstable, or an effect that needs so many requests it is indistinguishable from ordinary traffic. Retest at a quiet time and compare against a baseline.
How it is fixed
Enforce a maximum length on the server for every field, regardless of any browser-side attribute, and validate that the value matches the expected format. Cap the size of any encoded or expanded version before it is stored or forwarded. Apply request size limits at the reverse proxy or application server so oversized bodies are refused early. Add rate limiting, and queue expensive work behind a bounded pool of workers so a burst degrades gracefully instead of returning 503s to everyone. Monitor error rates and latency per endpoint so a regression in one form shows up quickly.
Where these bugs hide
This class tends to sit in secondary forms: account completion, recovery flows, profile settings, invitation and referral codes, and any field that feeds a downstream API or a template. Useful signals are forms validated only in the browser, fields with a maxlength attribute but no server-side counterpart, endpoints that echo the submitted value back encoded, and services behind a shared gateway where one slow path can affect many routes.
To make a report land, show the mechanism rather than a single error: a baseline, a series of increasing sizes, the exact request, the response, and evidence that the effect is repeatable and affects availability rather than only your own session. Keep the payload minimal and explain what the server does with it. If the effect is only a transient error on one request, say so plainly; resource consumption reports are accepted when the consumption is demonstrated, not inferred.
Glossary
- Denial of service (DoS): making a service unavailable to its normal users, for example by exhausting its resources.
- 503 Service Temporarily Unavailable: an HTTP status code meaning the server is reachable but cannot handle the request right now.
- 5xx: the family of HTTP status codes that indicate a server-side failure.
- 4xx: the family of HTTP status codes that indicate a problem with the request itself, such as invalid input.
- Payload: the value or data you send to a server, here the string typed into the phone number field.
- Input validation: checking on the server that submitted data has the expected format, type and size.
- Encoding: converting text into another representation, for example escaping special characters, so it can be stored or transported safely.
- Backend: the server-side software that receives and processes requests, as opposed to what runs in your browser.
- Burp: a proxy tool that sits between browser and website so you can inspect and modify requests and responses.
- Proxy: software that relays traffic between two parties and lets you observe it.
- Request: the message your browser sends to a server asking for a page or submitting data.
- Response: the message the server sends back.
maxlength: an HTML attribute that limits how many characters a browser lets you type into a field; it is only a browser-side check.- Rate limiting: restricting how many requests a client may make in a period of time.
- Reverse proxy: a server that sits in front of the application and forwards requests to it, often enforcing size and rate limits.
- Uncontrolled resource consumption: a weakness where user input determines how much CPU, memory, disk or downstream work the server spends, with no upper bound.
- Latency: how long a request takes to get a response.
- Baseline: a normal measurement taken before testing, used for comparison.
- False positive: a finding that looks like a bug but is not one.
- Severity: a rating of how serious a vulnerability is, here medium.
- Bounty: a payment made by a programme to a researcher for a valid report.