CVE-2021-42771
Vulnerability Summary
Timeline
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.
CVSS Metrics
- v4.0•HIGH•Score: 8.7CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- v3.1•HIGH•Score: 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- v2.0•HIGH•Score: 7.2AV:L/AC:L/Au:N/C:C/I:C/A:C
EPSS Trends
Current EPSS score: 0.77%• Percentile: 54%
Techniques & Countermeasures
- CWE-22•Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Affected Systems
- alpine•py3-babel
< 2.9.1-r0 | < 2.9.1-r0 | < 2.9.1-r0 | < 2.9.1-r0 | < 2.9.1-r0 | < 2.9.1-r0 | < 2.9.1-r0 | < 2.9.1-r0 | < 2.9.1-r0
- debian•python-babel
< 2.8.0+dfsg.1-7 | < 2.8.0+dfsg.1-7 | < 2.8.0+dfsg.1-7 | < 2.8.0+dfsg.1-7
- debian•debian_linux
10.0
- pocoo•babel
< 2.9.1
- PyPI•babel
< 2.9.1
References (12)
- https://www.tenable.com/security/research/tra-2021-14
- https://github.com/python-babel/babel/pull/782
- https://lists.debian.org/debian-lts/2021/10/msg00040.html
- https://lists.debian.org/debian-lts-announce/2021/10/msg00018.html
- https://www.debian.org/security/2021/dsa-5018
- https://nvd.nist.gov/vuln/detail/CVE-2021-42771
- https://github.com/python-babel/babel/commit/412015ef642bfcc0d8ba8f4d05cdbb6aac98d9b3
- https://github.com/advisories/GHSA-h4m5-qpfp-3mpv
- https://github.com/pypa/advisory-database/tree/main/vulns/babel/PYSEC-2021-421.yaml
- https://github.com/python-babel/babel
- https://security-tracker.debian.org/tracker/CVE-2021-42771
- https://security.alpinelinux.org/vuln/CVE-2021-42771