Your submission was sent successfully! Close

You have successfully unsubscribed! 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 Severity Score

9.8

Score breakdown

Status

Package Release Status
python2.7
Launchpad, Ubuntu, Debian
impish Not vulnerable
(2.7.18-4)
kinetic Not vulnerable
(2.7.18-4)
lunar Does not exist

upstream Needs triage

groovy Ignored
(end of life)
trusty
Released (2.7.6-8ubuntu0.6+esm10)
Available with Ubuntu Pro or Ubuntu Pro (Infra-only)
bionic
Released (2.7.17-1~18.04ubuntu1.6)
hirsute Not vulnerable
(2.7.18-4)
xenial
Released (2.7.12-1ubuntu0~16.04.18)
focal
Released (2.7.18-1~20.04.1)
jammy Not vulnerable
(2.7.18-4)
This vulnerability is mitigated in part by the use of -D_FORTIFY_SOURCE=2 in Ubuntu.
python3.4
Launchpad, Ubuntu, Debian
impish Does not exist

kinetic Does not exist

lunar Does not exist

upstream Needs triage

xenial Does not exist

bionic Does not exist

focal Does not exist

groovy Does not exist

hirsute Does not exist

trusty
Released (3.4.3-1ubuntu1~14.04.7+esm10)
Available with Ubuntu Pro or Ubuntu Pro (Infra-only)
jammy Does not exist

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

kinetic Does not exist

lunar Does not exist

upstream Needs triage

trusty Needed

bionic Does not exist

focal Does not exist

groovy Does not exist

hirsute Does not exist

xenial
Released (3.5.2-2ubuntu0~16.04.13)
jammy Does not exist

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

kinetic Does not exist

lunar Does not exist

upstream Needs triage

trusty Does not exist

xenial Does not exist

focal Does not exist

groovy Does not exist

hirsute Does not exist

bionic
Released (3.6.9-1~18.04ubuntu1.4)
jammy 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
impish Does not exist

kinetic Does not exist

lunar Does not exist

upstream Needs triage

trusty Does not exist

xenial Does not exist

focal Does not exist

groovy Does not exist

hirsute Does not exist

bionic
Released (3.7.5-2~18.04.4)
jammy Does not exist

Patches:

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


python3.8
Launchpad, Ubuntu, Debian
groovy
Released (3.8.6-1ubuntu0.2)
impish Does not exist

kinetic Does not exist

lunar Does not exist

xenial Does not exist

upstream Needs triage

trusty Does not exist

hirsute Does not exist

bionic
Released (3.8.0-3~18.04.1)
focal
Released (3.8.5-1~20.04.2)
jammy 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

hirsute Not vulnerable
(3.9.1-3)
impish Not vulnerable
(3.9.1-3)
kinetic Does not exist

lunar Does not exist

trusty Does not exist

upstream
Released (3.9.1-3)
xenial Does not exist

focal
Released (3.9.5-3~20.04.1)
groovy
Released (3.9.5-3~20.10.1)
jammy 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.

Severity score breakdown

Parameter Value
Base score 9.8
Attack vector Network
Attack complexity Low
Privileges required None
User interaction None
Scope Unchanged
Confidentiality High
Integrity impact High
Availability impact High
Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H