mozilla/rhino · Security
Rhino has high CPU usage and potential DoS when passing specific numbers to `toFixed()` function
- GHSA ID
- GHSA-3w8q-xq97-5j7x
- CVE ID
- CVE-2025-66453
- Severity
- low
- Published
- Updated
- CVSS v4
- 2.7 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U
Description
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.pow5mult
where pow5mult attempts to raise 5 to a ridiculous power.
Example code: (4.47118444E-314).toFixed(2)
CWEs
- CWE-400 · Uncontrolled Resource Consumption