create-react-app 将y18n升级到 >=5.0.5

bq9c1y66  于 2个月前  发布在  React
关注(0)|答案(2)|浏览(25)

描述漏洞

y18n@4.0.0 被自动化安全检查标记为存在漏洞。建议升级到5.0.5版本。

dced5bon

dced5bon1#

面对相同的问题,这会影响5.0.5之前的y18n包。PoC由po6ix提供:

const y18n = require('y18n')();
y18n.setLocale('proto');
y18n.updateLocale({polluted: true});
console.log(polluted); // true
u7up0aaq

u7up0aaq2#

Facing the same issue!
This affects the package y18n before 5.0.5. PoC by po6ix: const y18n = require('y18n')(); y18n.setLocale('__proto__'); y18n.updateLocale({polluted: true}); console.log(polluted); // true

相关问题