CVE Database›Document archive›CVE-2021-20095

CVE-2021-20095

python-babel: Relative path traversal allows attacker to load arbitrary locale files and execute arbitrary code

Loading…

Severity

Moderate

Red Hat Product Security

7.8

CVSS 3.1

Review impact separately from score.

Published · April 28, 2021

Updated · November 1, 2026

Description

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.

Statement

It is rather uncommon for applications to use Babel.Locale() with an untrusted attacker-controlled language argument. A static language abbreviation string (e.g. "en") is most commonly used instead. For this reason, this flaw has been rated as having a security impact of Moderate.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CWE-22 · Improper Limitation of a Pathname to a Restricted Directory