Your submission was sent successfully! Close

CVE-2021-3177

Published: 19 January 2021

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.

Notes

AuthorNote
mdeslaur
on Ubuntu, binaries are compiled with Fortify Source, so
exploiting this issue will likely only cause Python to crash,
leading to a denial of service.
Priority

Medium

CVSS 3 base score: 9.8

Status

Package Release Status
python2.7
Launchpad, Ubuntu, Debian
bionic
Released (2.7.17-1~18.04ubuntu1.6)
focal
Released (2.7.18-1~20.04.1)
groovy Ignored
(reached end-of-life)
hirsute Not vulnerable
(2.7.18-4)
impish Not vulnerable
(2.7.18-4)
jammy Not vulnerable
(2.7.18-4)
kinetic Not vulnerable
(2.7.18-4)
precise Ignored

trusty
Released (2.7.6-8ubuntu0.6+esm10)
upstream Needs triage

xenial
Released (2.7.12-1ubuntu0~16.04.18)
This vulnerability is mitigated in part by the use of -D_FORTIFY_SOURCE=2 in Ubuntu.
python3.4
Launchpad, Ubuntu, Debian
bionic Does not exist

focal Does not exist

groovy Does not exist

hirsute Does not exist

impish Does not exist

jammy Does not exist

kinetic Does not exist

precise Does not exist

trusty
Released (3.4.3-1ubuntu1~14.04.7+esm10)
upstream Needs triage

xenial Does not exist

This vulnerability is mitigated in part by the use of -D_FORTIFY_SOURCE=2 in Ubuntu.
python3.5
Launchpad, Ubuntu, Debian
bionic Does not exist

focal Does not exist

groovy Does not exist

hirsute Does not exist

impish Does not exist

jammy Does not exist

kinetic Does not exist

precise Does not exist

trusty Needs triage

upstream Needs triage

xenial
Released (3.5.2-2ubuntu0~16.04.13)
This vulnerability is mitigated in part by the use of -D_FORTIFY_SOURCE=2 in Ubuntu.
python3.6
Launchpad, Ubuntu, Debian
bionic
Released (3.6.9-1~18.04ubuntu1.4)
focal Does not exist

groovy Does not exist

hirsute Does not exist

impish Does not exist

jammy Does not exist

kinetic Does not exist

precise Does not exist

trusty Does not exist

upstream Needs triage

xenial Does not exist

Patches:
upstream: https://github.com/python/cpython/commit/34df10a9a16b38d54421eeeaf73ec89828563be7 (3.6)



This vulnerability is mitigated in part by the use of -D_FORTIFY_SOURCE=2 in Ubuntu.
python3.7
Launchpad, Ubuntu, Debian
bionic
Released (3.7.5-2~18.04.4)
focal Does not exist

groovy Does not exist

hirsute Does not exist

impish Does not exist

jammy Does not exist

kinetic Does not exist

precise Does not exist

trusty Does not exist

upstream Needs triage

xenial Does not exist

Patches:

upstream: https://github.com/python/cpython/commit/d9b8f138b7df3b455b54653ca59f491b4840d6fa (3.7)


python3.8
Launchpad, Ubuntu, Debian
bionic
Released (3.8.0-3~18.04.1)
focal
Released (3.8.5-1~20.04.2)
groovy
Released (3.8.6-1ubuntu0.2)
hirsute Does not exist

impish Does not exist

jammy Does not exist

kinetic Does not exist

precise Does not exist

trusty Does not exist

upstream Needs triage

xenial Does not exist

Patches:


upstream: https://github.com/python/cpython/commit/ece5dfd403dac211f8d3c72701fe7ba7b7aa5b5f (3.8)

This vulnerability is mitigated in part by the use of -D_FORTIFY_SOURCE=2 in Ubuntu.
python3.9
Launchpad, Ubuntu, Debian
bionic Does not exist

focal
Released (3.9.5-3~20.04.1)
groovy
Released (3.9.5-3~20.10.1)
hirsute Not vulnerable
(3.9.1-3)
impish Not vulnerable
(3.9.1-3)
jammy Does not exist

kinetic Does not exist

precise Does not exist

trusty Does not exist

upstream
Released (3.9.1-3)
xenial Does not exist

Patches:



upstream: https://github.com/python/cpython/commit/c347cbe694743cee120457aa6626712f7799a932 (3.9)
This vulnerability is mitigated in part by the use of -D_FORTIFY_SOURCE=2 in Ubuntu.