Qombat
New Member
- Messages
- 25
- Reaction score
- 1
- Points
- 0
A vulnerability has been found in most 32-bit versions of PHP which causes the interpreter to hang when parsing a specific floating point number.
As a result, any script taking user input and treating it as a number is vulnerable to a DoS attack.
It takes next to no effort to initiate, and PHP on your machine will enter an infinite loop.
Fixes are being worked on but for now, if you don't need to work with floating point numbers, don't.
Vulnerable:
Safe:
For reference, this is safe because it ignores everything past the decimal place.
-For user safety, I have been asked to remove the specific floating point number, along with the cause behind the action PHP takes.-
Trust me, if your site is public in any way shape or form, you'll thank me later.
As a result, any script taking user input and treating it as a number is vulnerable to a DoS attack.
It takes next to no effort to initiate, and PHP on your machine will enter an infinite loop.
Fixes are being worked on but for now, if you don't need to work with floating point numbers, don't.
Vulnerable:
Code:
$id = (int)$_GET['x'];
Safe:
Code:
$id = (int)substr($_GET['x'], 0, strpos($_GET['x'], "."));
-For user safety, I have been asked to remove the specific floating point number, along with the cause behind the action PHP takes.-
Trust me, if your site is public in any way shape or form, you'll thank me later.
Last edited: