# CVE-2021-42771: Directory Traversal in Babel

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.77%, higher than 56% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-10-20T20:05:35.000Z
- Modified: 2026-06-17T04:10:06.940Z
- Also known as: GHSA-h4m5-qpfp-3mpv, PYSEC-2021-421
- Weaknesses: CWE-22
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- babel (PyPI): before 2.9.1
- pocoo babel: before 2.9.1
- debian debian_linux: 10.0

## Every score

- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.2 High `AV:L/AC:L/Au:N/C:C/I:C/A:C`

## References

- <https://www.tenable.com/security/research/tra-2021-14> (exploit, third-party-advisory, web)
- <https://github.com/python-babel/babel/pull/782> (patch, third-party-advisory, web)
- <https://lists.debian.org/debian-lts/2021/10/msg00040.html> (mailing-list, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2021/10/msg00018.html> (mailing-list, third-party-advisory, web)
- <https://www.debian.org/security/2021/dsa-5018> (third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-42771> (advisory)
- <https://github.com/python-babel/babel/commit/412015ef642bfcc0d8ba8f4d05cdbb6aac98d9b3> (web)
- <https://github.com/advisories/GHSA-h4m5-qpfp-3mpv> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/babel/PYSEC-2021-421.yaml> (web)
- <https://github.com/python-babel/babel> (web)

## Sources

- CVE List: [CVE-2021-42771](https://www.cve.org/CVERecord?id=CVE-2021-42771), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-h4m5-qpfp-3mpv](https://github.com/advisories/GHSA-h4m5-qpfp-3mpv), CC-BY-4.0, modified 2024-09-12
- NVD: [CVE-2021-42771](https://nvd.nist.gov/vuln/detail/CVE-2021-42771), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-421](https://osv.dev/vulnerability/PYSEC-2021-421), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-42771 · Whole record: https://cve.day/CVE-2021-42771.json · Rebuilt by cve.day 2026-11-25T22:58:04.703Z
