CVE-2021-3177 Memory corruption in n/a

Critical 9.8 Published Updated

A buffer overflow in Python's ctypes module allows remote code execution when processing untrusted floating-point numbers.

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

What is CVE-2021-3177?

CVE-2021-3177 is a critical memory corruption vulnerability in Debian Debian Linux, published on 19 Jan 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Python applications that accept floating-point numbers as untrusted input, as demonstrated by a 1e300 argument to c_double.from_param. This occurs because sprintf is used unsafely.

Weakness: CWE-120

Which versions are affected by CVE-2021-3177?

3 open source packages ship an affected version, including libpython, python and python-min. It affects 10 products.

PackageAffectedFixed in
libpython BitnamiAll versions3.6.13, 3.7.10, 3.8.8, 3.9.2
python BitnamiAll versions3.6.13, 3.7.10, 3.8.8, 3.9.2
python-min BitnamiAll versions3.6.13, 3.7.10, 3.8.8, 3.9.2

Products include Debian Debian Linux, Fedoraproject Fedora, Netapp Active Iq Unified Manager, Netapp Ontap Select Deploy Administration Utility, Oracle Communications Cloud Native Core Network Function Cloud Native Environment, Oracle Communications Offline Mediation Controller and 4 more.

How do I fix CVE-2021-3177?

Upgrade libpython to a fixed version for your release line: 3.6.13, 3.7.10, 3.8.8 or 3.9.2.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-3177 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-3177 exists.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2021-3177, BIT-libpython-2021-3177, BIT-python-2021-3177, BIT-python-min-2021-3177, CLEANSTART-2026-FH60481, DEBIAN-CVE-2021-3177 and 8 more.

Is CVE-2021-3177 in your software?

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

Check your SBOMs for free