CVE-2021-42771: Path Traversal

Published Apr 28, 2021
·
Updated

A flaw was found in python-babel. A path traversal vulnerability was found in how locale data files are checked and loaded within python-babel, allowing a local attacker to trick an application that uses python-babel to load a file outside of the intended locale directory. The highest threat from this vulnerability is to data confidentiality and integrity as well as service availability.

Other sources

Babel.Locale in Babel before 2.9.1 allows attackers to load arbitrary locale .dat files (containing serialized Python objects) via directory traversal, leading to code execution.

Python-Babel Babel could allow a local authenticated attacker to traverse directories on the system, caused by a flaw in the Babel.Locale function. An attacker could load a specially-crafted .dat file containing "dot dot" sequences (/../) to execute arbitrary code on the system.

IBM

Affected Software

18 affected componentsFixes available
redhat/babel<0:2.5.1-7.el8
0:2.5.1-7.el8
redhat/python27-babel<0:0.9.6-10.el7
0:0.9.6-10.el7
redhat/python27-python<0:2.7.18-3.el7
0:2.7.18-3.el7
redhat/python27-python-jinja2<0:2.6-16.el7
0:2.6-16.el7
redhat/python27-python-pygments<0:1.5-5.el7
0:1.5-5.el7
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
debian/python-babel
2.6.0+dfsg.1-1+deb10u12.8.0+dfsg.1-72.10.3-12.10.3-2
debian/python-babel<=2.6.0+dfsg.1-1, <=2.8.0+dfsg.1-6
2.8.0+dfsg.1-72.6.0+dfsg.1-1+deb10u1
pip/babel<2.9.1
2.9.1
Pocoo Babel<2.9.1
Debian Debian Linux=10.0
IBM Edge Application Manager<=4.5

Event History

Apr 28, 2021
CVE Published
12:00 AM
Oct 20, 2021
CVE Published
via MITRE·08:05 PM
Data Sourced
via MITRE·08:05 PM
Description
Oct 21, 2021
Advisory Published
via GitHub·05:49 PM
Aug 20, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected 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 the severity of CVE-2021-42771?

CVE-2021-42771 is classified as a high severity vulnerability due to its potential for exploitation via path traversal.

2

How do I fix CVE-2021-42771?

To fix CVE-2021-42771, upgrade the affected packages to the recommended patched versions listed in the vulnerability advisory.

3

Which software is affected by CVE-2021-42771?

CVE-2021-42771 affects multiple packages including python-babel and its various versions across different operating systems.

4

What type of vulnerability is CVE-2021-42771?

CVE-2021-42771 is a path traversal vulnerability that allows attackers to access files outside the intended directory.

5

Can CVE-2021-42771 be exploited remotely?

No, CVE-2021-42771 is primarily a local vulnerability that requires local access to exploit.

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