Rhino has high CPU usage and potential DoS when passing specific numbers to `toFixed()` function
Package
Affected versions
< 1.7.14.1
>= 1.7.15, < 1.7.15.1
= 1.8.0
Patched versions
1.7.14.1
1.7.15.1
1.8.1
Description
Published to the GitHub Advisory Database
Dec 3, 2025
Reviewed
Dec 3, 2025
Published by the National Vulnerability Database
Dec 3, 2025
Last updated
Dec 4, 2025
When an application passed an attacker controlled float poing number into the
toFixed()function, it might lead to high CPU consumption and a potential Denial of Service.Small numbers go through this call stack:
NativeNumber.numTo > DToA.JS_dtostr > DToA.JS_dtoa > DToA.pow5multwhere
pow5multattempts to raise5to a ridiculous power.Example code:
(4.47118444E-314).toFixed(2)References