CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-8F24-V5VV-GM5J

GHSA-8f24-v5vv-gm5j: Open Redirect in next-intl Middleware via URL Parsing Discrepancy

Alon Barad
Alon Barad
Software Engineer

Apr 11, 2026·5 min read·14 visits

Executive Summary (TL;DR)

Unsanitized ASCII control characters in next-intl middleware paths allow unauthenticated attackers to execute open redirects via protocol-relative URLs.

An open redirect vulnerability exists in the next-intl middleware for Next.js applications prior to version 4.9.1. The sanitization logic fails to account for WHATWG URL Specification rules regarding ASCII control characters, allowing attackers to craft malicious links that bypass validation and execute protocol-relative redirects to arbitrary external domains.

Vulnerability Overview

The next-intl library provides internationalization capabilities for Next.js applications. It utilizes middleware to manage locale-based routing, handling user navigation across different language variants. This middleware normalizes URLs, manages redirects, and ensures requests are correctly prefixed with the appropriate locale.

Versions of next-intl prior to 4.9.1 contain an open redirect vulnerability (CWE-601) within the middleware routing logic. The flaw allows an unauthenticated remote attacker to craft specific URIs that redirect users to arbitrary external domains. The vulnerability stems from incomplete sanitization of URL paths containing specific ASCII control characters.

The vulnerability is currently tracked under the GitHub Security Advisory GHSA-8f24-v5vv-gm5j. While open redirects are generally classified as moderate severity, they serve as a critical enabler for targeted phishing campaigns and OAuth token leakage. Security teams should prioritize patching applications utilizing the vulnerable middleware component.

Root Cause Analysis

The vulnerability exists within the sanitizePathname function located in packages/next-intl/src/middleware/utils.tsx. This function normalizes incoming request paths to prevent malicious redirects, specifically attempting to neutralize protocol-relative URLs that begin with double slashes (//).

Prior to the patch, the sanitization logic performed only two operations: encoding backslashes (\) as %5C and collapsing multiple consecutive slashes (//+) into a single slash (/). This implementation failed to account for the WHATWG URL Specification, which governs how modern browsers parse and construct URLs.

The WHATWG specification mandates that certain ASCII control characters—specifically TAB (U+0009), LF (U+000A), and CR (U+000D)—are silently stripped during URL parsing. When a user requests a path containing these characters, the middleware preserves them, but the client-side browser subsequently removes them when resolving the redirect target. This discrepancy between server-side sanitization and client-side parsing creates the conditions for the open redirect.

Code Analysis

The patch introduces a critical string replacement operation within the sanitizePathname function. The original implementation missed the removal of ASCII control characters, allowing them to pass through the middleware's normalization process intact.

// Vulnerable Implementation
export function sanitizePathname(pathname: string) {
  return pathname
    .replace(/\\/g, '%5C')
    .replace(/\/+/g, '/');
}

The updated code, introduced in commit 1c80b668aa6d853f470319eec10a3f61e78a70e6, implements an explicit removal of TAB, LF, and CR characters. This replacement occurs immediately after backslash encoding and before slash collapsing.

// Patched Implementation
export function sanitizePathname(pathname: string) {
  return pathname
    .replace(/\\/g, '%5C')
    .replace(/[\t\n\r]/g, '') // Strips TAB, LF, CR
    .replace(/\/+/g, '/');
}

By stripping these characters on the server side, the middleware effectively aligns its normalization logic with the WHATWG specification. If an attacker attempts to inject a TAB character between slashes, the server now strips the TAB and subsequently collapses the resulting double slash into a single slash, neutralizing the protocol-relative URL attack vector.

Exploitation and Attack Methodology

Exploitation requires the attacker to construct a URL targeting a Next.js application running a vulnerable version of next-intl. The attacker embeds an encoded control character, such as %09 (TAB), strategically within the URL path. A typical payload follows the structure http://<victim-domain>/<locale>/%09/attacker.com.

When the victim clicks the crafted link, the next-intl middleware processes the request. It decodes the URL-encoded characters, resulting in a path structured as /en/[TAB]/attacker.com. The middleware then attempts to normalize this path by removing the locale prefix and issues an HTTP redirect instruction to the client.

Upon receiving the redirect response, the victim's browser processes the target URL /[TAB]/attacker.com. Following the WHATWG specification, the browser silently drops the TAB character. The resulting string //attacker.com is interpreted as a protocol-relative URL, instructing the browser to initiate a request to the external domain attacker.com.

Impact Assessment

The primary impact of this vulnerability is the facilitation of sophisticated phishing campaigns. Attackers leverage the reputation and trust of the vulnerable domain to construct convincing links. When victims click these links, they are transparently redirected to an attacker-controlled site designed to harvest credentials or distribute malware.

Beyond basic phishing, open redirects often serve as a critical stepping stone in complex attack chains. If the vulnerable application implements OAuth or similar authentication flows, attackers can utilize the open redirect to exfiltrate authorization codes or access tokens by manipulating callback URIs.

The vulnerability is classified as moderate severity, reflecting the requirement for user interaction. The execution relies exclusively on social engineering to prompt a victim to initiate the malicious request. However, the lack of authentication requirements and the high success rate of domain-trusted phishing links warrant immediate remediation.

Remediation and Mitigation

The primary remediation strategy requires upgrading the next-intl package to version 4.9.1 or later. This update contains the necessary logic to strip ASCII control characters during path sanitization. Development teams should execute npm install next-intl@latest to apply the fix.

Organizations unable to deploy the patch immediately can mitigate the vulnerability using Web Application Firewall (WAF) rules. Administrators should configure the WAF to intercept and drop HTTP requests containing encoded control characters (%09, %0A, %0D) within the request path.

Security engineers should also review existing application routing logic for similar URL parsing discrepancies. The misalignment between server-side path normalization and client-side URL parsing is a common source of bypasses in routing middleware. Relying exclusively on regex-based string replacements often leaves edge cases exposed to manipulation.

Official Patches

amannnOfficial patch commit modifying sanitizePathname
amannnPull request resolving the vulnerability
amannnRelease notes for version 4.9.1

Fix Analysis (1)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N

Affected Systems

Next.js applications utilizing the next-intl middleware for internationalized routing.

Affected Versions Detail

Product
Affected Versions
Fixed Version
next-intl
amannn
< 4.9.14.9.1
AttributeDetail
CWE IDCWE-601
Attack VectorNetwork
CVSS v4.0 ScoreModerate
Exploit StatusProof-of-Concept
ImpactOpen Redirect / Phishing Enabler
AuthenticationNone Required

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1566.002Phishing: Spearphishing Link
Initial Access
CWE-601
URL Redirection to Untrusted Site ('Open Redirect')

A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.

Known Exploits & Detection

GitHub AdvisoryDetails regarding the URL manipulation using URL-encoded tab characters (%09).

Vulnerability Timeline

Fix commit authored and merged into main
2026-04-10
Official release of patched version 4.9.1
2026-04-10

References & Sources

  • [1]GitHub Advisory: GHSA-8f24-v5vv-gm5j
  • [2]Fix Commit: 1c80b668aa6d853f470319eec10a3f61e78a70e6
  • [3]Pull Request #2304
  • [4]Release v4.9.1

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•23 minutes ago•CVE-2026-59864
9.3

CVE-2026-59864: Critical Out-of-Package Local File Inclusion in Microsoft Kiota

CVE-2026-59864 is a critical path traversal vulnerability in Microsoft Kiota occurring when custom OpenAPI extensions specify a nested static template file. Lack of input sanitization allows malicious inputs to write directory traversal sequences directly into plugin manifests, causing out-of-package local file disclosure in downstream environments like Microsoft 365 Copilot.

Amit Schendel
Amit Schendel
1 views•7 min read
•about 15 hours ago•GHSA-X445-F3H2-J279
7.5

GHSA-X445-F3H2-J279: OAuth Provider Confusion in Auth.js and NextAuth.js

A critical logical security flaw exists in Auth.js (formerly NextAuth.js) where signed anti-CSRF check cookies (state, nonce, and PKCE code_verifier) are not bound to the specific Identity Provider that initiated the authorization flow. In multi-provider environments, this allows an attacker to replay valid, cryptographically signed cookies minted during a flow with one provider against a callback handling a different provider. This vulnerability can lead to session hijacking, identity theft, or unauthorized account linking.

Alon Barad
Alon Barad
7 views•7 min read
•about 16 hours ago•GHSA-7RQJ-J65F-68WH
8.1

GHSA-7RQJ-J65F-68WH: Account Takeover via Homoglyph Bypass in NextAuth.js Email Normalization

A security vulnerability in the email normalization logic of NextAuth.js and Auth.js allows remote attackers to bypass email validation constraints and achieve Account Takeover (ATO) through Unicode homoglyph smuggling. Under standard conditions, Unicode compatibility characters represent visually similar symbols that are normalized downstream to ASCII equivalents, facilitating structural validation bypasses. This issue specifically affects passwordless email authentication flows.

Alon Barad
Alon Barad
8 views•6 min read
•about 17 hours ago•GHSA-XMF8-CVQR-RFGJ
7.5

GHSA-XMF8-CVQR-RFGJ: Denial of Service via Uncaught Exception and Session Confusion in Auth.js

Auth.js (formerly NextAuth.js) contains a denial of service vulnerability due to an uncaught URIError in the getToken() token parser when processing malformed percent-encoded sequences in bearer tokens. Additionally, the library was vulnerable to session state confusion and replay attacks because OAuth check cookies (state, nonce, and PKCE) were not properly bound to specific providers, permitting cross-provider token reuse.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 18 hours ago•CVE-2026-53467
5.3

CVE-2026-53467: Heap Information Disclosure via Uninitialized Pixel Cache in ImageMagick MNG Decoder

CVE-2026-53467 is a heap information disclosure vulnerability in the Multiple-image Network Graphics (MNG) decoder of ImageMagick. The vulnerability arises from a failure to zero-initialize newly allocated pixel cache memory buffers. A remote attacker can exploit this by submitting a crafted sparse MNG image file to trigger uninitialized memory preservation. The resulting output contains residual heap bytes, potentially leaking sensitive process memory or assisting in ASLR bypass.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 19 hours ago•CVE-2026-55223
6.3

CVE-2026-55223: Remote Code Execution via Deserialization Gadget Chain in c3p0 Connection Pooling Library

An untrusted deserialization vulnerability exists in the c3p0 JDBC connection pooling library before version 0.14.0. Standard JDBC getter methods conform to the JavaBean property getter pattern, allowing introspection libraries like Apache Commons BeanUtils to evaluate connection properties dynamically during deserialization, leading to arbitrary code execution when chained with a vulnerable database driver or JNDI sink.

Alon Barad
Alon Barad
6 views•6 min read