i18next-http-middleware Path Traversal and SSRF Vulnerability

Vulnerability

A vulnerability in i18next-http-middleware versions prior to 3.9.3 allows for path traversal or server-side request forgery (SSRF) attacks. The middleware passes user-controlled language and namespace values directly to the i18next backend connector without proper sanitization. This oversight can be exploited depending on the configured backend: with i18next-fs-backend, it enables unauthorized file access, while with i18next-http-backend, it allows requests to internal services that could lead to credential theft.

Impact

Exploitation of this vulnerability could result in arbitrary file read access through filesystem-style backends, or SSRF via HTTP-style backends, potentially allowing access to internal services or cloud metadata endpoints for credential theft.

Reproduction

To reproduce this vulnerability, send a request to the locales resources endpoint with crafted lng and ns parameters. The i18next-fs-backend will read the specified file from the server's filesystem, while the i18next-http-backend will forward the request to an internal service, which could be exploited to access sensitive data.

Remediation

Users are advised to upgrade to i18next-http-middleware version 3.9.3 or later. Additionally, upgrading the backend to i18next-fs-backend version 2.6.4 or i18next-http-backend version 3.0.5 will also mitigate the vulnerability.

Added: May 8, 2026, 6:14 PM
Updated: May 8, 2026, 6:14 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
7.7
remediation
0.0
relevance
7.8
threat
1.6
urgency
2.9
incentive
4.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.