Executive brief
i18next-http-backend is a JavaScript library used to load translation files for website internationalization. A vulnerability in how the library handles language and namespace settings allows an attacker to manipulate the web requests made by the application. This could lead to unauthorized access to internal files, bypasses of security filters, or the redirection of requests to unintended locations, potentially exposing sensitive configuration data.
Technical details
i18next-http-backend versions prior to 3.0.5 are vulnerable to URL injection (CWE-74) and path traversal (CWE-22). The library's 'interpolate' function in 'lib/utils.js' fails to encode or validate 'lng' (language) and 'ns' (namespace) values before substituting them into 'loadPath' or 'addPath' templates. Because these values are often sourced from user-controlled inputs like query parameters or headers via 'i18next-browser-languagedetector', a remote attacker can inject special characters (e.g., '../', '?', '#'). This allows for path traversal to access arbitrary files in Server-Side Rendering (SSR) environments using the 'file://' scheme, or query-string injection to bypass authorization logic. The issue is fixed in version 3.0.5 by implementing a new 'interpolateUrl' function that validates URL segments against a blocklist of special characters and length limits.
Affected products
- i18next i18next-http-backend < 3.0.5
Timeline
- 2026-04-18: patched: Fix committed in version 3.0.5
- 2026-04-18: advisory: GitHub Security Advisory GHSA-q89c-q3h5-w34g published
- 2026-05-07: disclosed: CVE-2026-41691 published to NVD