highCVSS 8.6Vulnerability

GHSA-5fgg-jcpf-8jjw

### Summary 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], ...)` — the `setPath` helper did not guard against `__proto__`, `constructor`, or `prototype` keys, writing into `Object.prototype` when those values were supplied. - `i18next.services.backendConnector.load(languages, namespaces, ...)` — depending on the configured backend, unvalidated path segments enabled filesystem path traversal (e.g. with `i18next-fs-backend`) or SSRF (e.g. with `i18next-http-backend`). - A `namespaces.forEach(ns => i18next.options.ns.push(ns))` loop additionally performed permanent, unbounded growth of the shared singleton namespace list. - `missingKeyHandler` — iterated the incoming request body with `for...in`, which traverses inherited prototype-chain properties. A POST body like `{"__proto__": {"isAdmin": true}}` was forwarded into `saveMissing`. ### Impact - **Prototype pollution** — a single unauthenticated request of the form `GET /locales/resources.json?lng=__proto__&ns=isAdmin` writes into `Object.prototype`, affecting every plain object created subsequently in the Node.js process. This can break authorization checks (`if (user.isAdmin)`), cause denial of service via type confusion, or be chained into RCE depending on what downstream code reads from polluted objects. - **Path traversal / SSRF** — with filesystem or HTTP backends that interpolate `lng`/`ns` into paths or URLs, attacker-controlled values like `ns=../../etc/passwd` or `lng=internal-service` could reach resources outside the intended scope. - **Denial of se

Properties

ghsa_id
GHSA-5fgg-jcpf-8jjw
summary
i18next-http-middleware: Prototype pollution and path traversal via user-controlled language and namespace parameters
severity
high
cvss_score
8.6
cve_id
GHSA-5fgg-jcpf-8jjw
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L
is_ghsa_only
true
ghsa_published
2026-04-22T17:40:47Z
source_url
https://github.com/advisories/GHSA-5fgg-jcpf-8jjw
ghsa_updated
2026-04-22T17:40:47Z

Related Entities (5)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]npm/i18next-http-middleware

AFFECTS (1)

[Software]npm/i18next-http-middleware

HAS_WEAKNESS (2)

[Weakness]Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
[Weakness]Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Explore deeper with Ninja Signal's threat intelligence graph