First published: Mon May 11 2020(Updated: )
A vulnerability was found in PyLong_FromString() in Python, which is used by int("text"). For non-binary bases it uses an algorithm with quadratic time complexity to convert a string into an arbitrary precision number. It takes about 50ms to parse an int string with 100,000 digits and about 5sec for 1,000,000 digits. The float type, decimal type, int.from_bytes(), and int() for binary bases 2, 4, 8, 16, and 32 are not affected.
Affected Software | Affected Version | How to fix |
---|---|---|
CPython |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of REDHAT-BUG-1834423 is considered significant due to its impact on performance with large integer strings.
To fix REDHAT-BUG-1834423, update to the patched version of Python provided by your distribution.
All versions of Python using the affected PyLong_FromString() function are susceptible to REDHAT-BUG-1834423.
The impact of REDHAT-BUG-1834423 includes potential denial of service due to excessive parsing times for large integer strings.
Yes, REDHAT-BUG-1834423 is a documented vulnerability that has been reported and tracked in various bug databases.