A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40299

CVE-2026-40299: next-intl SSRF Vulnerability

CVE-2026-40299 is an SSRF flaw in next-intl middleware that allows attackers to redirect users off-site through manipulated URLs. This article covers technical details, affected versions, security impact, and mitigation.

Published: April 23, 2026

CVE-2026-40299 Overview

CVE-2026-40299 is an Open Redirect vulnerability affecting the next-intl internationalization library for Next.js applications. Applications using the next-intl middleware prior to version 4.9.1 with localePrefix: 'as-needed' configuration could construct URLs where path handling and the WHATWG URL parser resolved a relative redirect target to another host. This allows attackers to craft malicious URLs using scheme-relative paths (e.g., //) or control characters that are silently stripped by the URL parser, enabling the middleware to redirect users to external malicious sites while the initial URL appears to originate from a trusted application domain.

Critical Impact

Attackers can leverage this vulnerability to redirect users from trusted application URLs to malicious external sites, potentially enabling phishing attacks, credential theft, or malware distribution by exploiting user trust in the legitimate application domain.

Affected Products

  • next-intl versions prior to 4.9.1
  • Next.js applications using next-intl middleware with localePrefix: 'as-needed' configuration
  • Applications utilizing locale-based URL routing with the vulnerable middleware

Discovery Timeline

  • 2026-04-17 - CVE-2026-40299 published to NVD
  • 2026-04-20 - Last updated in NVD database

Technical Details for CVE-2026-40299

Vulnerability Analysis

This vulnerability (CWE-601: URL Redirection to Untrusted Site) exists in the next-intl middleware's pathname sanitization logic. The vulnerability stems from how the middleware handles URL path parsing in conjunction with the WHATWG URL parser's behavior. When processing locale-prefixed URLs, the middleware failed to account for control characters (specifically U+0009 TAB, U+000A LF, and U+000D CR) that the WHATWG URL parser silently strips during URL normalization.

An attacker could exploit this by inserting these control characters into URL paths. When the middleware processes a path like /en/\t/malicious.com, the tab character creates a visual segment separator, but when passed to the URL parser, the tab is stripped, collapsing the path to //malicious.com. This scheme-relative URL is then interpreted as a protocol-relative redirect to malicious.com, effectively bypassing the application's URL validation.

Root Cause

The root cause lies in the sanitizePathname() function within packages/next-intl/src/middleware/utils.tsx. The original implementation only sanitized backslashes and consecutive forward slashes, but failed to account for WHATWG-stripped control characters (TAB, LF, CR) that could be exploited to construct open redirect payloads. The WHATWG URL specification silently strips these characters during parsing, creating a discrepancy between what the middleware validates and what the browser interprets.

Attack Vector

The attack is network-based and requires no authentication or user interaction beyond clicking a malicious link. An attacker crafts a URL targeting the vulnerable application with embedded control characters (TAB, LF, or CR) positioned to create scheme-relative redirects after WHATWG parsing. Since the link appears to originate from the trusted domain, users are more likely to click it, making this particularly effective for phishing campaigns.

typescript
// Vulnerable sanitizePathname function (before patch)
// Source: https://github.com/amannn/next-intl/commit/1c80b668aa6d853f470319eec10a3f61e78a70e6

export function sanitizePathname(pathname: string) {
  // Sanitize malicious URIs, e.g.:
  // '/en/\\example.org → /en/%5C%5Cexample.org'
  // '/en////example.org → /en/example.org'
  return pathname.replace(/\\/g, '%5C').replace(/\/+/g, '/');
}
typescript
// Patched sanitizePathname function (version 4.9.1)
// Source: https://github.com/amannn/next-intl/commit/1c80b668aa6d853f470319eec10a3f61e78a70e6

export function sanitizePathname(pathname: string) {
  // Sanitize malicious URIs, e.g.:
  // '/en/\\example.org'  → '/en/%5Cexample.org'     (backslash → %5C)
  // '/en/\t/example.org' → '/en/example.org'        (WHATWG-stripped TAB)
  // '/en/\n/example.org' → '/en/example.org'        (WHATWG-stripped LF)
  // '/en/\r/example.org' → '/en/example.org'        (WHATWG-stripped CR)
  // '/en////example.org' → '/en/example.org'        (consecutive slashes)
  //
  // U+0009/000A/000D are silently stripped by the WHATWG URL parser
  // (https://url.spec.whatwg.org/#concept-url-parser). Without removing
  // them here, a decoded TAB in a segment separator position causes
  // new URL("/\t/host", base) to collapse to "//host" → open redirect.
  return pathname
    .replace(/\\/g, '%5C')
    .replace(/[\t\n\r]/g, '')
    .replace(/\/+/g, '/');
}

Detection Methods for CVE-2026-40299

Indicators of Compromise

  • HTTP requests containing URL-encoded control characters in path segments (e.g., %09, %0A, %0D)
  • Redirect responses pointing to external domains from locale-switching endpoints
  • Unusual patterns in application logs showing decoded TAB, LF, or CR characters in URL paths
  • User reports of unexpected redirects from trusted application links

Detection Strategies

  • Monitor web application firewall (WAF) logs for requests containing control characters in URL paths
  • Implement detection rules for URL patterns matching /%09/, /%0A/, /%0D/ or their decoded equivalents
  • Review HTTP response headers for Location headers pointing to unexpected external domains
  • Audit Next.js application logs for middleware redirect events to non-application domains

Monitoring Recommendations

  • Configure SIEM alerts for HTTP 3xx responses redirecting to external hosts from locale endpoints
  • Implement URL normalization logging to detect discrepancies between raw and parsed URLs
  • Monitor for anomalous traffic patterns suggesting open redirect exploitation attempts
  • Set up browser-side monitoring for navigation events to unexpected domains

How to Mitigate CVE-2026-40299

Immediate Actions Required

  • Upgrade next-intl to version 4.9.1 or later immediately
  • Audit application logs for evidence of exploitation attempts
  • Review any custom URL handling or redirect logic for similar WHATWG parsing issues
  • Implement WAF rules to block requests containing control characters in URL paths as a defense-in-depth measure

Patch Information

The vulnerability has been patched in next-intl@4.9.1. The fix enhances the sanitizePathname() function to strip WHATWG-stripped control characters (TAB, LF, CR) before URL processing, preventing the open redirect condition. For detailed patch information, see the GitHub Security Advisory GHSA-8f24-v5vv-gm5j and the GitHub Release v4.9.1.

Workarounds

  • If immediate upgrade is not possible, implement middleware to strip control characters from incoming request URLs before they reach next-intl
  • Configure reverse proxy or WAF rules to reject requests containing %09, %0A, or %0D in URL paths
  • Consider temporarily disabling localePrefix: 'as-needed' configuration if the feature is not critical
  • Implement Content Security Policy headers to limit redirect destinations
bash
# Upgrade next-intl to patched version
npm update next-intl@4.9.1

# Or using yarn
yarn upgrade next-intl@4.9.1

# Verify installed version
npm list next-intl

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechNext Intl

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-601
  • Technical References
  • GitHub Commit Update

  • GitHub Pull Request

  • GitHub Release v4.9.1

  • GitHub Security Advisory GHSA-8f24-v5vv-gm5j
  • Latest CVEs
  • CVE-2026-9813: FlowIntel SSRF Vulnerability

  • CVE-2026-4377: D-Link DWR-X1820 Auth Bypass Vulnerability

  • CVE-2026-47074: ex_aws_sns Auth Bypass Vulnerability

  • CVE-2026-46241: Linux Kernel Use-After-Free Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English