CJK codecs tests call eval() on content retrieved via HTTP
By default, the tests are not run with network resources enabled and so the Python test suite is safe.
But if the Python test suite is run explicitly with the “network” resource enabled (-u network or -u all command line option), the CJK codecs tests of the Python test suite run eval() on content received via HTTP from pythontest.net.
If an attacker can compromise the pythontest.net server, they gain arbitrary code execution on all buildbots.
If an attacker has control over the network connection of a machine running the Python test suite, they gain arbitrary code execution there.
make testall, make testuniversal and make buildbottest commands are impacted (pass -u all option to the test suite).
The CI of the Python project is impacted (buildbot, Travis CI, GitHub Action, Azure Pipelines).
With the fix, content is still retrieved via HTTP, but the unsafe eval() function is no longer used.
Disclosure date: 2020-10-05 (Python issue bpo-41944 reported)
Reported at: 2020-10-05 (email sent to the PSRT list)
Reported by: Florian Bruhin
Python 3.6.13 (2021-02-16) fixed by commit e912e94 (branch 3.6) (2020-10-20)
Python 3.7.10 (2021-02-16) fixed by commit 43e5231 (branch 3.7) (2020-10-20)
Python 3.8.7 (2020-12-21) fixed by commit 6c6c256 (branch 3.8) (2020-10-06)
Python 3.9.1 (2020-12-07) fixed by commit b664a1d (branch 3.9) (2020-10-06)
[security] Python testsuite calls eval() on content received via HTTP.
Python issue: bpo-41944
Creation date: 2020-10-05
Reporter: Serhiy Storchaka
In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP.
CVE ID: CVE-2020-27619
CVSS Score: 7.5
Package list is empty or all packages have requested keywords.