Lucene search

K
osvGoogleOSV:PSF-2021-3
HistoryJan 19, 2021 - 12:00 a.m.

ctypes: Buffer overflow in PyCArg_repr

2021-01-1900:00:00
Google
osv.dev
12
python
buffer overflow
pycarg_repr
remote code execution
floating-point numbers
sprintf unsafely
software

AI Score

10

Confidence

High

EPSS

0.031

Percentile

91.2%

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.