#VU50621 Code Injection in Python


Published: 2021-02-11

Vulnerability identifier: #VU50621

Vulnerability risk: Medium

CVSSv3.1: 7.7 [CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2020-27619

CWE-ID: CWE-94

Exploitation vector: Local network

Exploit availability: No

Vulnerable software:
Python
Universal components / Libraries / Scripting languages

Vendor: Python.org

Description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to Python executed eval() function on the code, retrieved via HTTP protocol in Lib/test/multibytecodec_support.py CJK codec tests. A remote attacker with ability to intercept network traffic can perform a Man-in-the-Middle (MitM) attack and execute arbitrary Python code on the system.

Mitigation
Install updates from vendor's website.

Vulnerable software versions

Python: 3.8 - 3.8.6, 3.5 - 3.5.10, 3.7 - 3.7.9, 3.6 - 3.6.12, 3.9.0 - 3.9.0b4, 3.4 - 3.4.10, 3.3 - 3.3.7, 3.1 - 3.1.2150, 3.0 - 3.0.1, 3.2 - 3.2.2150


External links
http://bugs.python.org/issue41944
http://github.com/python/cpython/commit/2ef5caa58febc8968e670e39e3d37cf8eef3cab8
http://github.com/python/cpython/commit/43e523103886af66d6c27cd72431b5d9d14cd2a9
http://github.com/python/cpython/commit/6c6c256df3636ff6f6136820afaefa5a10a3ac33
http://github.com/python/cpython/commit/b664a1df4ee71d3760ab937653b10997081b1794
http://github.com/python/cpython/commit/e912e945f2960029d039d3390ea08835ad39374b
http://security.netapp.com/advisory/ntap-20201123-0004/


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the local network (LAN).

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.


Latest bulletins with this vulnerability