CVE-2017-12852 Numpy missing input validation

High 7.5 Published Updated

Attackers can cause a denial of service by passing empty lists or arrays to the numpy.pad function, triggering an infinite loop.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-12852?

CVE-2017-12852 is a high-severity denial of service vulnerability in n/a, published on 15 Aug 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The numpy.pad function in Numpy 1.13.1 and older versions is missing input validation. An empty list or ndarray will stick into an infinite loop, which can allow attackers to cause a DoS attack.

Weakness: CWE-835

Which versions are affected by CVE-2017-12852?

3 open source packages ship an affected version, including numpy. It affects 1 product.

PackageAffectedFixed in
numpy PyPIAll versions1.13.3
numpy PyPIAll versions1.13.3
numpy PyPIAll versions1.13.3
Linux distribution packages (4)
python-numpy_1_13_3-gnu-hpc SUSE:Linux Enterprise Module for HPC 12All versions1.13.3-4.6.1
python-numpy SUSE:Linux Enterprise Server 12 SP5All versions1.8.0-5.19.1
python-numpy SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions1.8.0-5.19.1
python-numpy SUSE:Linux Enterprise Software Development Kit 12 SP5All versions1.8.0-5.19.1

Products include Numpy Numpy.

How do I fix CVE-2017-12852?

Upgrade numpy to 1.13.3 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2017-12852 being exploited?

There is no known exploitation of CVE-2017-12852 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-frgw-fgh6-9g52, PYSEC-2017-1, SUSE-RU-2017:3010-1, SUSE-SU-2022:3954-1, UBUNTU-CVE-2017-12852.

Is CVE-2017-12852 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free