CVE-2024-43370 gettext.js vulnerable to cross-site scripting (XSS)

High 7.2 Published Updated

An attacker can execute arbitrary scripts in the browser if gettext.js processes corrupted .po dictionary files, affecting applications using this library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-43370?

CVE-2024-43370 is a high-severity cross-site scripting vulnerability in guillaumepotier gettext.js, published on 15 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

gettext.js is a GNU gettext port for node and the browser. There is a cross-site scripting (XSS) injection if `.po` dictionary definition files are corrupted. This vulnerability has been patched in version 2.0.3. As a workaround, control the origin of the definition catalog to prevent the use of this flaw in the definition of plural forms.

Weakness: CWE-79

Which versions are affected by CVE-2024-43370?

2 open source packages ship an affected version, including gettext.js.

PackageAffectedFixed in
gettext.js npmAll versions2.0.3
gettext.js npmAll versions2.0.3

How do I fix CVE-2024-43370?

Upgrade gettext.js to 2.0.3 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2024-43370 being exploited?

There is no known exploitation of CVE-2024-43370 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2024-43370, GHSA-vwhg-jwr4-vxgg, UBUNTU-CVE-2024-43370.

Is CVE-2024-43370 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free