fix(deps): update dependency next-intl to ^4.9.2 [security] - #855
Open
renovate[bot] wants to merge 1 commit into
Open
fix(deps): update dependency next-intl to ^4.9.2 [security]#855renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
Coverage Report for packages/configs/vitest-config
File CoverageNo changed files found. |
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
2 times, most recently
from
April 14, 2026 17:52
30e18af to
f1960d8
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
2 times, most recently
from
April 27, 2026 23:48
f1960d8 to
2e41a75
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
April 29, 2026 16:04
2e41a75 to
4d77d2f
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
April 29, 2026 21:13
4d77d2f to
cc764a8
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
May 12, 2026 16:46
cc764a8 to
1c36b42
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
May 12, 2026 21:18
1c36b42 to
5ea0b80
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
May 18, 2026 09:44
5ea0b80 to
02d613f
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
June 11, 2026 16:20
64542ae to
e0dd4f3
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
June 12, 2026 00:57
e0dd4f3 to
630cb87
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
July 3, 2026 09:53
630cb87 to
e3e05ee
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
July 3, 2026 14:02
e3e05ee to
4d71720
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
July 12, 2026 11:17
4d71720 to
69f0a87
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
July 12, 2026 16:47
69f0a87 to
1bfc82d
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
July 17, 2026 01:06
1bfc82d to
af31f20
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
July 17, 2026 11:19
af31f20 to
1e2d025
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
2 times, most recently
from
July 21, 2026 04:58
ffc1026 to
cd92d7b
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
July 24, 2026 19:39
cd92d7b to
e24e215
Compare
renovate
Bot
force-pushed
the
renovate/npm-next-intl-vulnerability
branch
from
July 24, 2026 23:09
e24e215 to
85c0957
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.8.3→^4.9.2next-intl has an open redirect vulnerability
CVE-2026-40299 / GHSA-8f24-v5vv-gm5j
More information
Details
Impact
Applications using the
next-intlmiddleware withlocalePrefix: 'as-needed'could construct URLs where path handling and the WHATWG URL parser resolved a relative redirect target to another host (e.g. scheme-relative//or control characters stripped by the URL parser), so the middleware could redirect the browser off-site while the user still started from a trusted app URL.Patches
The problem has been patched, please update to
next-intl@4.9.1.Credits
Many thanks to Joni Liljeblad from Oura for responsibly disclosing the vulnerability and for suggesting the fix.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
next-intl has prototype pollution with
experimental.messages.precompilevia attacker-controlled translation catalog keysGHSA-4c35-wcg5-mm9h
More information
Details
Summary
setNestedPropertyinpackages/next-intl/src/extractor/utils.tsxwalks a dotted key path and assigns the final value without blocking the reserved keys__proto__,constructor, orprototype. When the next-intl Next.js plugin is configured withexperimental.messagesandmessages.precompile: true, a JSON translation catalog containing a top‑level__proto__key causessetNestedProperty(result, '__proto__.isAdmin', compiledMessage)to assign ontoObject.prototype, polluting every object in the running build process.Details
Root cause —
packages/next-intl/src/extractor/utils.tsx:13-34:The existence check
!(key in current)uses theinoperator, which walks the prototype chain. Forkey === '__proto__','__proto__' in {}istrue(it's inherited fromObject.prototype) andtypeof current['__proto__'] === 'object'(it isObject.prototype). The guard therefore never re-initializescurrent[key], andcurrent = current['__proto__']redirects all subsequent writes ontoObject.prototype. The final assignmentcurrent[keys[keys.length-1]] = valuesetsObject.prototype[<attacker key>] = <attacker value>.Build-time data flow:
packages/next-intl/src/plugin/catalog/catalogLoader.tsx:55-83— the webpack/turbopack loader receives the catalog filesourceand, ifoptions.messages.precompileis enabled, callscodec.decode(source, {locale}).packages/next-intl/src/extractor/format/codecs/JSONCodec.tsx:9-18—decoderunsJSON.parse(source). V8 installs__proto__as an own data property on the result when the JSON key is literally"__proto__"(bypassing the normalObject.prototype.__proto__setter that would otherwise reassign the prototype).JSONCodec.tsx:33-53—traverseMessagesiteratesObject.keys(obj), which for a JSON‑parsed object includes the own__proto__key. It readsobj.__proto__(returns the attacker’s nested object, notObject.prototype, because it's an own property), recurses into it, and emits message id__proto__.isAdmin.catalogLoader.tsx:71—precompileMessages(decoded, cache).catalogLoader.tsx:89-131— for each message, callssetNestedProperty(result, message.id, compiledMessage). Withmessage.id === '__proto__.isAdmin',setNestedPropertywalks intoObject.prototypeand assignsObject.prototype.isAdmin = compiledMessage.The same sink is also reachable via
JSONCodec.encode(JSONCodec.tsx:20-26) andPOCodec(packages/next-intl/src/extractor/format/codecs/POCodec.tsx:87) during extraction, both of which feed attacker-influencedmessage.idvalues intosetNestedProperty— but those paths require control of source-code identifiers, which is a weaker attack vector than the build-time catalog path above.After pollution, every subsequent object access during the remainder of the Next.js build pipeline (webpack, turbopack, babel, next-intl’s own logic) inherits the attacker-controlled properties. This is a classic gadget-chain precondition for corrupting build-tool internals and tampering with generated bundles, since many build tools use patterns like
if (obj.someFlag)oroptions[key] ?? defaultthat are sensitive to polluted prototypes.Trust boundary note: next-intl’s message catalogs are realistically attacker-influenced in practice. Translation files are routinely round-tripped through external TMS systems (Crowdin, Lokalise, Transifex), accepted via community locale PRs, or pulled from third-party translation packages — any of which can carry a crafted
__proto__key unnoticed, since JSON translation diffs are usually merged with minimal scrutiny.PoC
Prerequisites: a Next.js project using next-intl ≤ 4.9.1 with the Next.js plugin configured:
Drop a malicious catalog at
messages/en.json:{ "Greeting": "Hello", "__proto__": { "isAdmin": "polluted" } }Run
next build(ornext dev). ThecatalogLoaderwill invokeJSONCodec.decode→traverseMessages→precompileMessages→setNestedProperty.Minimal reproduction of the sink itself (verified locally against the v4.9.1 source):
Output:
PWNED.Full chain reproduction (also verified):
After the loader runs,
({}).isAdmin === 'polluted'for the remainder of the build Node process.Impact
Object.prototypeis polluted for the lifetime of the build‑time Node.js process, affecting every object created or inspected thereafter in the Next.js build pipeline (webpack/turbopack loaders, babel plugins, next-intl’s own codecs, user plugins).obj.someFlag,options[key] ?? default,if (!config.noX), etc. can be coerced into unintended behavior, including emitting tampered bundles.experimental.messages+precompileconfiguration. Users who do not use the extractor/precompile features are not affected.Recommended Fix
Reject reserved keys in
setNestedPropertyand stop using theinoperator for the existence check. A minimal patch topackages/next-intl/src/extractor/utils.tsx:Additionally:
packages/next-intl/src/extractor/format/codecs/JSONCodec.tsx, maketraverseMessagesskip reserved keys (or switch toObject.create(null)+Object.hasOwnsemantics) so that a malicious catalog is rejected early with a clear error rather than producing__proto__.*message ids.packages/next-intl/src/plugin/catalog/catalogLoader.tsx, initializeprecompileMessages’sresultwithObject.create(null)as defense in depth, so even if a key slipped through it could not redirect throughObject.prototype.Severity
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
amannn/next-intl (next-intl)
v4.9.2Compare Source
Bug Fixes
precompile: true(#2307) (c0bf0ee) – by @amannnv4.9.1Compare Source
Bug Fixes
v4.9.0Compare Source
Features
transitionTypesonLink(#2302) (02811f5) – by @amannnv4.8.4Compare Source
Bug Fixes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.