Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
HIGH severity

Directory Traversal in BabelGHSA-h4m5-qpfp-3mpv

HIGHFix: python-babel/babel#782

GHSA-h4m5-qpfp-3mpv is a high-severity (CVSS 7.8) Path Traversal vulnerability in babel. 1 public exploit reference exists, so weaponization risk is real. A fix is available for babel — see the affected versions and patch details below.

Also known asCVE-2021-42771PYSEC-2021-421
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Oct 12, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs54th percentile — riskier than 54% of all scored CVEsHighest risk
0.00%0.42%0.85%1.27%0.2%0.8%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-h4m5-qpfp-3mpv by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐍babel

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIbabelall versions2.9.1pip install --upgrade 'babel==2.9.1'

Affected Products

2 products · 2 configurations
OS
debian linuxdebian
1 version
10.0
Application
babelpocoo
< 2.9.1
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for babel, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update babel to 2.9.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-h4m5-qpfp-3mpv is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

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.

ProductFixed inAdvisory
Red Hat Enterprise Linux 8python27:2.7-8050020210811095446.3e7ace8bRHSA-2021:4151
Red Hat Enterprise Linux 8python38:3.8-8050020210811101222.e3d35ccaRHSA-2021:4162
Red Hat Enterprise Linux 8babel-0:2.5.1-7.el8RHSA-2021:4201
Red Hat Software Collections for Red Hat Enterprise Linux 7python27-babel-0:0.9.6-10.el7RHSA-2021:3252
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-babel-0:2.7.0-12.el7RHSA-2021:3254

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is GHSA-h4m5-qpfp-3mpv in your dependencies?

Find it across PyPI, including transitive dependencies.

Directory Traversal in Babel (High 7.8)