i18next-http-middleware CVE-2026-41683
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted HTTP request with CRLF in lng parameter
-
DeliveryBypass HTML-entity encoder (utils.escape)
-
ExploitInject control characters into Content-Language header
-
ExecutionTrigger response splitting (Node < 14.6) or fatal exception (Node ≥ 14.6)
-
PersistHijack sessions/poison cache OR crash worker process
-
ImpactImpact all concurrent users
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Remote unauthenticated exploitation against default configurations of i18next-http-middleware < 3.9.3 when paired with i18next < 19.5.0. The backward-compatibility fallback at LanguageDetector.js:100 must be active, which occurs automatically when the i18next version predates 19.5.0 (released 2020). Exploitation severity depends on the Node.js runtime version: versions before 14.6.0 allow full HTTP response splitting (enabling header injection attacks), while versions 14.6.0 and later throw fatal exceptions (causing denial of service). The vulnerability triggers on any HTTP request where user-controlled input reaches the lng parameter-typically via query string (?lng=...), cookies, or Accept-Language headers, depending on the application's language detection configuration. No special application features, non-default settings, or administrative access required. The secondary XSS filter bypass requires the additional condition that the application renders res.locals.language into HTML using an unescaped templating mode (EJS <%- %>, Pug !{…}, Handlebars {{{…}}}), which is not a default configuration but is documented in i18next integration examples. Limiting factors: modern i18next versions (≥ 19.5.0) eliminate the vulnerable code path even when using older middleware versions, effectively requiring organizations to be running both outdated components simultaneously for full impact. |
| Impact | Real-world risk is HIGH despite the 8.6 CVSS score underestimating the denial-of-service impact. The CVSS vector (AV:N/AC:L/PR:N/UI:N) correctly identifies this as remotely exploitable with no authentication or user interaction required-a simple GET request with a crafted lng parameter triggers the vulnerability. Attack complexity is genuinely low; exploitation requires only basic HTTP knowledge and no special timing or race conditions. The dual-mode impact creates divergent risk profiles by environment: organizations running Node.js < 14.6.0 face classic web-layer attacks (session hijacking, cache poisoning, XSS), while those on modern Node.js versions face availability risk where a single malicious request crashes the worker process, affecting all concurrent users. This DoS vector is particularly severe in container or serverless deployments with slow cold-start times. The CVSS Availability rating of L(ow) significantly undervalues this process-wide crash scenario. No EPSS or KEV data provided, but the straightforward exploitation path and npm package scope (thousands of dependents in the i18next ecosystem) suggest moderate-to-high likelihood of opportunistic scanning once details are public. Patch availability in 3.9.3 with clear commit reference reduces residual risk for defenders who can upgrade rapidly. |
| Exploit ScenarioDerived | An attacker identifies a Node.js application using i18next-http-middleware < 3.9.3 paired with i18next < 19.5.0 by fingerprinting common language-switching endpoints or observing Content-Language response headers. Against a target running Node.js 12.x, the attacker sends GET /?lng=en%0d%0aSet-Cookie:%20session=attacker-controlled-token to inject a Set-Cookie header, enabling session fixation attacks against users who subsequently authenticate. Alternatively, they inject GET /?lng=en%0d%0aLocation:%20https://evil.com%0d%0a%0d%0a<script>alert(document.cookie)</script> to combine cache poisoning with reflected XSS, storing the malicious redirect and script in intermediary caches. Against targets running Node.js 14.6+ in production with PM2 or Kubernetes worker pools, the attacker sends GET /?lng=en%0d%0a repeatedly, triggering ERR_INVALID_CHAR exceptions that crash individual worker processes, degrading service availability as the orchestrator struggles to restart failed instances. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 23, 2026
HTTP response splitting and denial-of-service in i18next-http-middleware < 3.9.3 allows remote unauthenticated attackers to inject arbitrary HTTP headers or crash Node.js processes via CRLF sequences in the lng parameter. On Node.js < 14.6.0, attackers achieve response splitting enabling session fixation, cache poisoning, and reflected XSS. On Node.js ≥ 14.6.0, malformed headers trigger unhandled ERR_INVALID_CHAR exceptions, returning 500 errors to all concurrent users sharing the affected process. Vendor-released patch available in version 3.9.3. No public exploit identified at time of analysis, though exploitation is trivial given the attack vector (simple query parameter manipulation).
RemediationAI
Upgrade i18next-http-middleware to version 3.9.3 or later immediately. This release introduces utils.sanitizeHeaderValue() which strips carriage return, line feed, and all C0/C1 control characters before passing language values to res.setHeader(), eliminating both the response-splitting and DoS vectors. The patch also tightens the hasXSS() regex to detect event-handler attributes at any position, closing the secondary XSS filter bypass. Review package.json and lock files to ensure the upgrade propagates through all dependency trees-check both direct dependencies and transitive pulls via other i18next ecosystem packages. Update command: npm install i18next-http-middleware@3.9.3 or yarn upgrade i18next-http-middleware@3.9.3. After upgrading, validate that custom language detection logic (if any) does not reintroduce raw user input into response headers. As a temporary mitigation for systems where immediate upgrades are infeasible, deploy a WAF rule or reverse-proxy filter (nginx, Cloudflare WAF) to reject HTTP requests containing \r (percent-encoded as %0D) or \n (%0A) in query parameters, cookies, request paths, and Accept-Language headers-note this is a partial defense that may break legitimate use cases involving encoded content and does not address the DoS vector on Node.js ≥ 14.6.0. Consider adding process-level error handlers (process.on('uncaughtException')) as a stop-gap to prevent full process crashes, though this introduces complexity around graceful shutdown and may mask other bugs. No workaround fully closes the vulnerability; upgrading is the only complete remediation.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability exists in i18next-http-middleware's language detection and header-setting mechanism. When used with older i18next versions (< 19.5.0), the LanguageDetector module's backward-compatibility fallback passes raw user-controlled language values through utils.escape(), an HTML entity encoder that does not sanitize CRLF characters (\r\n). These unsanitized values flow directly into res.setHeader('Content-Language', ...), executed both in the languageChanged event listener and the main middleware flow. The root cause maps to CWE-79 (Improper Neutralization of Input During Web Page Generation), though the primary impact manifests as HTTP header injection rather than traditional XSS. The flaw represents a classic example of using the wrong sanitization primitive-HTML encoding does not provide protection against HTTP header injection attacks, which require removal or encoding of control characters per RFC 7230. The vulnerability also exposed a secondary XSS filter bypass in hasXSS() that failed to detect event handlers beyond the first attribute position, affecting applications rendering res.locals.language with unescaped templating modes.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
Primary rating from Vendor (https://github.com/i18next/i18next-http-middleware) · only source for this CVE.
CVSS VectorVendor: https://github.com/i18next/i18next-http-middleware
Lifecycle Timeline
2DescriptionCVE.org
Summary
Versions of i18next-http-middleware prior to 3.9.3 wrote user-controlled language values into the Content-Language response header after passing them through utils.escape(), which is an HTML-entity encoder that does not strip carriage return, line feed, or other control characters. When the application used an older i18next (< 19.5.0) that still exercised the backward-compatibility fallback at LanguageDetector.js:100 or otherwise produced a raw detected value, CRLF sequences in the attacker-controlled lng parameter reached res.setHeader('Content-Language', ...) verbatim.
Impact
Two concrete outcomes depending on the Node.js version:
- Node.js < 14.6.0 - HTTP response splitting. An attacker crafting a request like
GET /?lng=en%0d%0aX-Injected%3A+maliciouscould inject arbitrary additional HTTP response headers, enabling: - Session fixation via an injected
Set-Cookie - Cache poisoning (injecting
Location,Content-Type, etc.) - Reflected XSS in controlled response bodies
- Node.js ≥ 14.6.0 - denial of service.
res.setHeader()throwsERR_INVALID_CHARwhen the value contains CRLF. Because the middleware did not catch this error, it propagated as an unhandled exception, returning a 500 response to all concurrent users sharing that process (in worker-pool deployments this can knock out a full server instance).
The same header-setting code path fires inside the languageChanged event listener and again in the main middleware flow, so the flaw was triggered at least twice per affected request.
Related (same release)
Version 3.9.3 also tightens the hasXSS() regex that was designed as a secondary filter on detected language values. The previous pattern /<\s*\w+\s*on\w+\s*=.*?>/i only matched event handlers in the first attribute position, so payloads like <input autofocus onfocus=alert(1)> bypassed the filter. Applications that rendered res.locals.language into HTML with a context-unsafe templating mode (EJS <%- %>, Pug !{…}, Handlebars {{{…}}}) could be XSSed despite the filter being in place. This bypass is noted here because it is fixed in the same release, but the primary vulnerability reported in this advisory is the CRLF/header-injection path above.
Affected versions
< 3.9.3.
Patch
Fixed in 3.9.3. The patch introduces utils.sanitizeHeaderValue(str) which strips \r, \n, and other C0/C1 control characters, and replaces both utils.escape(lng) call sites in lib/index.js with it. The hasXSS() regex has also been tightened to match event-handler attributes at any position.
Workarounds
No workaround short of upgrading. Front-proxying the middleware with a WAF rule that rejects \r/\n in query parameters, cookies, and path segments is a partial mitigation.
Credits
Discovered via an internal security audit of the i18next ecosystem.
Blast Radius
ecosystem impact- 1 npm packages depend on i18next-http-middleware (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.9.3.
Executive ViewAI
i18next-http-middleware versions below 3.9.3 contain an HTTP response splitting vulnerability affecting Node.js applications, allowing unauthenticated attackers to inject malicious headers, poison caches, or trigger denial-of-service conditions that crash application processes. Organizations running affected middleware versions face immediate risks to application availability and potential session compromise across all users.
Apply vendor patch (upgrade to i18next-http-middleware 3.9.3 or later). Until patched: implement input validation to reject CRLF characters in the lng query parameter; configure reverse proxy or WAF to block requests containing %0d, %0a, \r, or \n in lng values; restrict middleware to Node.js ≥ 14.6.0 to limit impact to 500 errors rather than response splitting attacks.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)CVE.org
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
GHSA-c3h8-g69v-pjrg
NVD
CVE.org
EPSS
Exploit-DB