Advisories for Npm/I18next-Http-Middleware package

2026

i18next-http-middleware: Prototype pollution and path traversal via user-controlled language and namespace parameters

Versions of i18next-http-middleware prior to 3.9.3 pass user-controlled lng and ns parameters to two internal paths that use them in ways that enable prototype pollution and, depending on the configured backend, path traversal or SSRF. The vulnerable entry points are unauthenticated HTTP handlers that are part of the middleware's public API: getResourcesHandler — reads lng/ns from query parameters or route params and passes them unvalidated to: utils.setPath(resources, [lng, ns], …) …

i18next-http-middleware: HTTP response splitting and DoS via unsanitised Content-Language header

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', …