CVE-2021-3426: Path Traversal

Published Mar 5, 2021
·
Updated

A flaw was found in Python 3's pydoc. This flaw allows a local or adjacent attacker who discovers or can convince another local or adjacent user to start a pydoc server to access the server and then use it to disclose sensitive information belonging to the other user that they would not normally have the ability to access. The highest threat from this vulnerability is to data confidentiality.

Other sources

Python pydoc module could allow a remote attacker from within the local network obtain sensitive information. By starting the pydoc server, an attacker could exploit this vulnerability to extract arbitrary files.

IBM

Running pydoc -p allows other local users to extract arbitrary files

Red Hat

There's a flaw in Python 3's pydoc. A local or adjacent attacker who discovers or is able to convince another local or adjacent user to start a pydoc server could access the server and use it to disclose sensitive information belonging to the other user that they would not normally be able to access. The highest risk of this flaw is to data confidentiality. This flaw affects Python versions before 3.8.9, Python versions before 3.9.3 and Python versions before 3.10.0a7.

Affected Software

38 affected componentsFixes available
redhat/python3<0:3.6.8-41.el8
0:3.6.8-41.el8
redhat/rh-python38-babel<0:2.7.0-12.el7
0:2.7.0-12.el7
redhat/rh-python38-python<0:3.8.11-2.el7
0:3.8.11-2.el7
redhat/rh-python38-python-cryptography<0:2.8-5.el7
0:2.8-5.el7
redhat/rh-python38-python-jinja2<0:2.10.3-6.el7
0:2.10.3-6.el7
redhat/rh-python38-python-lxml<0:4.4.1-7.el7
0:4.4.1-7.el7
redhat/rh-python38-python-pip<0:19.3.1-2.el7
0:19.3.1-2.el7
redhat/rh-python38-python-urllib3<0:1.25.7-7.el7
0:1.25.7-7.el7
redhat/python<3.8.9
3.8.9
redhat/python<3.9.3
3.9.3
redhat/python<3.10.0
3.10.0
IBM Cloud Pak for Security<=1.10.0.0 - 1.10.11.0
IBM QRadar Suite Software<=1.10.12.0 - 1.10.16.0
debian/pypy3
7.3.5+dfsg-2+deb11u27.3.5+dfsg-2+deb11u47.3.11+dfsg-2+deb12u37.3.19+dfsg-1
debian/python2.7
2.7.18-8+deb11u1
debian/python3.9<=3.9.2-1
3.9.2-1+deb11u3
Python Python<2.7.18
Python Python>=3.6.0<3.6.13
Python Python>=3.7.0<3.7.10
Python Python>=3.8.0<3.8.8
Python Python>=3.9.0<3.9.3
Python Python=3.10.0-alpha1
Python Python=3.10.0-alpha2
Python Python=3.10.0-alpha3
Python Python=3.10.0-alpha4
Python Python=3.10.0-alpha5
Python Python=3.10.0-alpha6
Fedoraproject Fedora=32
Fedoraproject Fedora=33
Fedoraproject Fedora=34
Debian Debian Linux=9.0
redhat Software Collections
redhat Enterprise Linux=8.0
NetApp Cloud Backup
NetApp ONTAP Select Deploy administration utility
NetApp Snapcenter
Oracle Communications Cloud Native Core Binding Support Function=1.10.0
Oracle ZFS Storage Appliance Kit=8.8

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/python3 to a version that resolves this vulnerability.

    Fixed in 0:3.6.8-41.el8
  2. Upgrade

    Upgrade redhat/rh-python38-babel to a version that resolves this vulnerability.

    Fixed in 0:2.7.0-12.el7
  3. Upgrade

    Upgrade redhat/rh-python38-python to a version that resolves this vulnerability.

    Fixed in 0:3.8.11-2.el7
  4. Upgrade

    Upgrade redhat/rh-python38-python-cryptography to a version that resolves this vulnerability.

    Fixed in 0:2.8-5.el7
  5. Upgrade

    Upgrade redhat/rh-python38-python-jinja2 to a version that resolves this vulnerability.

    Fixed in 0:2.10.3-6.el7
  6. Upgrade

    Upgrade redhat/rh-python38-python-lxml to a version that resolves this vulnerability.

    Fixed in 0:4.4.1-7.el7
  7. Upgrade

    Upgrade redhat/rh-python38-python-pip to a version that resolves this vulnerability.

    Fixed in 0:19.3.1-2.el7
  8. Upgrade

    Upgrade redhat/rh-python38-python-urllib3 to a version that resolves this vulnerability.

    Fixed in 0:1.25.7-7.el7
  9. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.8.9
  10. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.9.3
  11. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.10.0
  12. Upgrade

    Upgrade debian/pypy3 to a version that resolves this vulnerability.

    Fixed in 7.3.5+dfsg-2+deb11u2Fixed in 7.3.5+dfsg-2+deb11u4Fixed in 7.3.11+dfsg-2+deb12u3Fixed in 7.3.19+dfsg-1
  13. Upgrade

    Upgrade debian/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.18-8+deb11u1
  14. Upgrade

    Upgrade debian/python3.9 to a version that resolves this vulnerability.

    Fixed in 3.9.2-1+deb11u3
  15. Configuration

    Do not expose the pydoc webserver to untrusted users; specifically, do not start pydoc with the -p or -n options (which allow other local users to extract arbitrary files).

    Python pydoc server (pydoc -p / pydoc -n HTTP options) Avoid HTTP server options (-p and -n) = Do not use -p or -n options
  16. Configuration

    Use pydoc console output (no argument needed) or generate an HTML file with the -w argument instead of using HTTP server options.

    Python pydoc (documentation generation mode) Use output generation instead of HTTP server options = Use console output (default, no argument) or HTML file (-w)

Event History

Mar 10, 2021
CVE Published
12:00 AM
May 20, 2021
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via NVD·01:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 15, 2024
Data Sourced
via Launchpad·12:45 PM
Description
Sep 13, 2024
Data Sourced
via Ubuntu·12:55 PM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2021-3426?

CVE-2021-3426 is a vulnerability in Python 3's pydoc that allows a local or adjacent attacker to access and disclose sensitive information belonging to another user.

2

How does CVE-2021-3426 affect Python 3?

CVE-2021-3426 affects Python 3 versions 3.8.9, 3.9.3, and 3.10.0.

3

How can the CVE-2021-3426 vulnerability be exploited?

The CVE-2021-3426 vulnerability can be exploited by a local or adjacent attacker who starts a pydoc server and convinces another user to access it, thereby allowing the attacker to access sensitive information.

4

What is the severity of CVE-2021-3426?

CVE-2021-3426 has a severity rating of 5.7 (Medium).

5

How can I fix the CVE-2021-3426 vulnerability?

To fix the CVE-2021-3426 vulnerability, it is recommended to update Python 3 to versions 3.8.9, 3.9.3, or 3.10.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203