CVE-2026-40299: Next intl Next-intl Has An Open Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-8f24-v5vv-gm5j
CWE-601
Published
Advisory Summary

CVE-2026-40299 is a MODERATE next-intl has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Next intl libraries in the npm ecosystem. The issue involves next-intl has an open redirect vulnerability. Remediation is available by upgrading affected packages to version 4.9.1.

CVE-2026-40299 at a Glance

CVE Identifier CVE-2026-40299
GHSA Identifier GHSA-8f24-v5vv-gm5j
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Next intl
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-40299

To remediate this vulnerability, upgrade all affected Next intl dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

next-intl fixed: 4.9.1
npm install next-intl@4.9.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls next-intl

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-40299, inspect your project dependencies using npm:

npm ls next-intl

Analyze the terminal output to locate any version of Next intl in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.9.1), your application is affected.

Note: The npm ls next-intl 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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Next intl, 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

### Impact Applications using the `next-intl` middleware with `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. ### Patches The problem has been patched, please update to [`next-intl@4.9.1`](https://github.com/amannn/next-intl/releases/tag/v4.9.1). ### Credits Many thanks to [Joni Liljeblad](https://github.com/joniumGit) from [Oura](https://ouraring.com) for responsibly disclosing the vulnerability and for suggesting the fix.

CVE-2026-40299 Affected Next intl Versions

1 component(s)
Fixed Versions:
4.9.1
Product / Package Ecosystem Affected Versions Fixed Version
next-intl
npm
< 4.9.1
4.9.1

References

Frequently Asked Questions

What is CVE-2026-40299?
CVE-2026-40299 is a security vulnerability in Next intl involving next-intl has an open redirect vulnerability under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Next intl versions are affected?
Affected versions include releases prior to 4.9.1 across affected packages: next-intl.
What version fixes CVE-2026-40299?
Upgrading to 4.9.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is next-intl affected?
Yes, next-intl is affected in releases prior to 4.9.1. Upgrade your dependency to 4.9.1 or later.
What CWE is associated with CVE-2026-40299?
CVE-2026-40299 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check npm dependencies for CVE-2026-40299?
Run the dependency tree command: 'npm ls next-intl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8f24-v5vv-gm5j",
  "modified" : "2026-04-24T20:48:37Z",
  "published" : "2026-04-10T21:03:55Z",
  "aliases" : [ "CVE-2026-40299" ],
  "summary" : "next-intl has an open redirect vulnerability",
  "details" : "### Impact\n\nApplications using the `next-intl` middleware with `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.\n\n### Patches\n\nThe problem has been patched, please update to [`next-intl@4.9.1`](https://github.com/amannn/next-intl/releases/tag/v4.9.1).\n\n### Credits\n\nMany thanks to [Joni Liljeblad](https://github.com/joniumGit) from [Oura](https://ouraring.com) for responsibly disclosing the vulnerability and for suggesting the fix.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "next-intl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.9.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/amannn/next-intl/security/advisories/GHSA-8f24-v5vv-gm5j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40299"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amannn/next-intl/pull/2304"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amannn/next-intl/commit/1c80b668aa6d853f470319eec10a3f61e78a70e6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/amannn/next-intl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amannn/next-intl/releases/tag/v4.9.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-10T21:03:55Z",
    "nvd_published_at" : "2026-04-17T21:16:34Z"
  }
}