Number Parsing Can Be Susceptible To Dos Attacks
Parsing numbers with many digits or extreme exponent notation can take a very long time in Java and similar libraries, so a malicious user could send such numbers to cause a denial of service. The text notes that even improved parsers do not remove the risk.
Published on systemweakness.com
Any application that takes inputs from potentially untrusted sources should be investigated in case they are susceptible to Denial of Service attacks.
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could send numbers with thousands of digits or extreme exponents to cause a denial of service by consuming excessive processing time; the text notes that improved parsers reduce but do not eliminate the risk.
What the attacker needed
Application parses untrusted numbers; no input size limit
The fix
Applications should limit input size, use the latest runtime and libraries, apply stricter limits to unauthenticated APIs, and consider representing numbers as strings for validation before parsing.
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 write-up has not been written yet. The Original tab links to the source.
When a program reads a number from user input, it has to convert the text into a number it can work with. If the text is extremely long or uses a special format like a huge exponent, that conversion can take a very long time and tie up the server. An attacker can exploit this by sending such numbers to make the service slow or unavailable, which is called 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.