#VU61681 Server-Side Request Forgery (SSRF) in Python - CVE-2021-4189


Vulnerability identifier: #VU61681

Vulnerability risk: Medium

CVSSv4.0: 1.2 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:N/SA:N/E:U/U:Green]

CVE-ID: CVE-2021-4189

CWE-ID: CWE-918

Exploitation vector: Network

Exploit availability: No

Vulnerable software:
Python
Universal components / Libraries / Scripting languages

Vendor: Python.org

Description

The disclosed vulnerability allows a remote attacker to perform SSRF attacks.

The vulnerability exists due to insufficient validation of user-supplied input in the FTP (File Transfer Protocol) client library when using it in PASV (passive) mode. A remote attacker can set up a malicious FTP server, trick the FTP client in Python into connecting back to a given IP address and port, which can lead to FTP client scanning ports which otherwise would not have been possible.

Mitigation
Install updates from vendor's website.

Vulnerable software versions

Python: 3.6 - 3.6.13, 3.7 - 3.7.10, 3.8 - 3.8.8, 3.9.0b4 - 3.9.2


External links
https://bugzilla.redhat.com/show_bug.cgi?id=2036020
https://bugs.python.org/issue43285
https://github.com/python/cpython/commit/4134f154ae2f621f25c5d698cc0f1748035a1b88


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

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


Latest bulletins with this vulnerability