CJK codecs tests call eval() on content retrieved via HTTP

Warning

This resource is maintained for historical reference and does not contain the latest vulnerability info for Python.

The canonical database for vulnerabilities affecting Python is available on GitHub in the Open Source Vulnerability (OSV) format. This vulnerability can be viewed online at the Open Source Vulnerability Database.

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.

Dates:

  • 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

Fixed In

Python issue

[security][CVE-2020-27619] Python testsuite calls eval() on content received via HTTP.

  • Python issue: bpo-41944
  • Creation date: 2020-10-05
  • Reporter: Serhiy Storchaka

CVE-2020-27619

In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP.

Timeline

Timeline using the disclosure date 2020-10-05 as reference: