Advisory

GHSA-c4w7-xm78-47vh

Also known as: CVE-2020-7774

Summary

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-03-29 16:05 UTC
Modified
2024-12-05 15:28 UTC

Affected packages and fixes

y18n

npm · All systems

Affected

  • introduced 0, fixed 3.2.2 (semver)

Fixed versions

3.2.2

Fix

y18n

npm · All systems

Affected

  • introduced 4.0.0, fixed 4.0.1 (semver)

Fixed versions

4.0.1

Fix

y18n

npm · All systems

Affected

  • introduced 5.0.0, fixed 5.0.5 (semver)

Fixed versions

5.0.5

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences