CVE-2026-40299 next-intl has an open redirect vulnerability

Medium 6.9 Published Updated

Attackers can redirect users to malicious sites via crafted URLs when using specific locale prefix configurations in next-intl middleware.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40299?

CVE-2026-40299 is a medium-severity vulnerability in amannn next-intl, published on 17 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

next-intl provides internationalization for Next.js. Applications using the `next-intl` middleware prior to version 4.9.1with `localePrefix: '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. The problem has been patchedin `[email protected]`.

Weakness: CWE-601

Which versions are affected by CVE-2026-40299?

2 open source packages ship an affected version, including next-intl.

PackageAffectedFixed in
next-intl npmAll versions4.9.1
next-intl npmAll versions4.9.1

How do I fix CVE-2026-40299?

Upgrade next-intl to 4.9.1 or later.

Is CVE-2026-40299 being exploited?

There is no known exploitation of CVE-2026-40299 in the wild and no public exploit code.

Sources

Also known as GHSA-8f24-v5vv-gm5j.

Is CVE-2026-40299 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free