CVE-2026-41683: i18next-http-middleware Denial of Service Vulnerability
HIGHCVE-2026-41683 is a HIGH (CVSS 8.6) denial of service vulnerability (CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')) affecting i18next-http-middleware libraries in the npm ecosystem. The issue involves http response splitting and dos via unsanitised content-language header. Remediation is available by upgrading affected packages to version 3.9.3.
CVE-2026-41683 at a Glance
Security Impact
CVSS: 8.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L).
How to Fix CVE-2026-41683
To remediate this vulnerability, upgrade all affected i18next-http-middleware dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install i18next-http-middleware@3.9.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls i18next-http-middleware
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-41683, inspect your project dependencies using npm:
npm ls i18next-http-middleware
Analyze the terminal output to locate any version of i18next-http-middleware in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.9.3), your application is affected.
Note: The npm ls i18next-http-middleware 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-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting'), where the product receives data from an http agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes cr and lf characters before the data is included in outgoing http headers. In i18next-http-middleware, 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
CVE-2026-41683 Affected i18next-http-middleware Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
i18next-http-middleware
|
npm |
< 3.9.3
|
3.9.3
|
References
Frequently Asked Questions
What is CVE-2026-41683?
Which i18next-http-middleware versions are affected?
What version fixes CVE-2026-41683?
Is i18next-http-middleware affected?
What is the CVSS score of CVE-2026-41683?
What CWE is associated with CVE-2026-41683?
How can I check npm dependencies for CVE-2026-41683?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c3h8-g69v-pjrg",
"modified" : "2026-05-13T13:29:47Z",
"published" : "2026-04-22T20:25:49Z",
"aliases" : [ "CVE-2026-41683" ],
"summary" : "i18next-http-middleware: HTTP response splitting and DoS via unsanitised Content-Language header",
"details" : "### Summary\n\nVersions 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.\n\n### Impact\n\nTwo concrete outcomes depending on the Node.js version:\n\n- **Node.js < 14.6.0 — HTTP response splitting.** An attacker crafting a request like `GET /?lng=en%0d%0aX-Injected%3A+malicious` could inject arbitrary additional HTTP response headers, enabling:\n - Session fixation via an injected `Set-Cookie`\n - Cache poisoning (injecting `Location`, `Content-Type`, etc.)\n - Reflected XSS in controlled response bodies\n- **Node.js ≥ 14.6.0 — denial of service.** `res.setHeader()` throws `ERR_INVALID_CHAR` when 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).\n\nThe 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.\n\n### Related (same release)\n\nVersion 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.\n\n### Affected versions\n\n`< 3.9.3`.\n\n### Patch\n\nFixed 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.\n\n### Workarounds\n\nNo 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.\n\n### Credits\n\nDiscovered via an internal security audit of the i18next ecosystem.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "i18next-http-middleware"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.9.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/i18next/i18next-http-middleware/security/advisories/GHSA-c3h8-g69v-pjrg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41683"
}, {
"type" : "WEB",
"url" : "https://github.com/i18next/i18next-http-middleware/commit/65301c194593d46a84623b64e5fde2f51d3550f6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/i18next/i18next-http-middleware"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-113", "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-22T20:25:49Z",
"nvd_published_at" : "2026-05-08T16:16:11Z"
}
}