Directory Traversal in Babel
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | babel | < 2.9.1 | 2.9.1 |
References
- https://www.tenable.com/security/research/tra-2021-14
- https://lists.debian.org/debian-lts/2021/10/msg00040.html
- https://github.com/python-babel/babel/pull/782
- https://lists.debian.org/debian-lts-announce/2021/10/msg00018.html
- https://github.com/advisories/GHSA-h4m5-qpfp-3mpv
- https://nvd.nist.gov/vuln/detail/CVE-2021-42771
- https://github.com/python-babel/babel/commit/412015ef642bfcc0d8ba8f4d05cdbb6aac98d9b3
- https://github.com/pypa/advisory-database/tree/main/vulns/babel/PYSEC-2021-421.yaml
- https://github.com/python-babel/babel
- https://www.debian.org/security/2021/dsa-5018
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-22- Platform
- Python (PyPI)
- Package
babel- Disclosed
- 20.10.2021
- Updated
- 11.10.2026 11:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2021-421 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-h4m5-qpfp-3mpv - CC BY 4.0
Vulnerability history: babel
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.