CVE-2026-41691: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in i18next i18next-http-backend
CVE-2026-41691 is a path traversal and URL injection vulnerability in i18next-http-backend versions prior to 3. 0. 5. The issue arises because the library interpolates language (lng) and namespace (ns) values directly into URL templates without proper encoding or sanitization. This allows an attacker who can control these values (commonly via query parameters, cookies, or headers) to manipulate the request URL structure, potentially accessing unintended resources. The vulnerability has been fixed in version 3. 0. 5 by introducing proper sanitization. Users unable to upgrade immediately can mitigate the risk by sanitizing input values to remove dangerous characters and limit length.
AI Analysis
Technical Summary
The vulnerability in i18next-http-backend (< 3.0.5) involves improper limitation of a pathname to a restricted directory (CWE-22) and broader URL-structure injection (CWE-74). The library interpolates user-controlled lng and ns parameters directly into loadPath/addPath URL templates without encoding or validation. Since i18next-browser-languagedetector exposes these parameters to user input by default, attackers can inject path traversal sequences or other URL manipulation characters. This can alter the outgoing request URL, potentially leading to unauthorized resource access. The issue is resolved in version 3.0.5 by applying the interpolateUrl sanitization fix. As a workaround, input sanitization (removing '..', '/', '\', '?', '#', '%', whitespace, control characters, and limiting length) before passing values to i18next is recommended.
Potential Impact
The vulnerability allows an attacker to manipulate the URL used by i18next-http-backend to load resources by injecting path traversal or URL-structure altering characters via language or namespace parameters. This can lead to unauthorized access to resources outside the intended directories, potentially exposing sensitive data or causing unintended behavior. The CVSS score of 6.5 (medium severity) reflects the network attack vector with no privileges or user interaction required, and impacts confidentiality and integrity but not availability. No known exploits in the wild have been reported.
Mitigation Recommendations
A fix is available in i18next-http-backend version 3.0.5, which includes proper sanitization of user-controlled parameters. Users should upgrade to version 3.0.5 or later to fully remediate the vulnerability. If immediate upgrade is not possible, users should sanitize the lng and ns input values before they reach i18next by stripping characters such as '..', '/', '\', '?', '#', '%', whitespace, and control characters, and by limiting the input length. This workaround reduces the risk until the official fix can be applied.
CVE-2026-41691: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in i18next i18next-http-backend
Description
CVE-2026-41691 is a path traversal and URL injection vulnerability in i18next-http-backend versions prior to 3. 0. 5. The issue arises because the library interpolates language (lng) and namespace (ns) values directly into URL templates without proper encoding or sanitization. This allows an attacker who can control these values (commonly via query parameters, cookies, or headers) to manipulate the request URL structure, potentially accessing unintended resources. The vulnerability has been fixed in version 3. 0. 5 by introducing proper sanitization. Users unable to upgrade immediately can mitigate the risk by sanitizing input values to remove dangerous characters and limit length.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in i18next-http-backend (< 3.0.5) involves improper limitation of a pathname to a restricted directory (CWE-22) and broader URL-structure injection (CWE-74). The library interpolates user-controlled lng and ns parameters directly into loadPath/addPath URL templates without encoding or validation. Since i18next-browser-languagedetector exposes these parameters to user input by default, attackers can inject path traversal sequences or other URL manipulation characters. This can alter the outgoing request URL, potentially leading to unauthorized resource access. The issue is resolved in version 3.0.5 by applying the interpolateUrl sanitization fix. As a workaround, input sanitization (removing '..', '/', '\', '?', '#', '%', whitespace, control characters, and limiting length) before passing values to i18next is recommended.
Potential Impact
The vulnerability allows an attacker to manipulate the URL used by i18next-http-backend to load resources by injecting path traversal or URL-structure altering characters via language or namespace parameters. This can lead to unauthorized access to resources outside the intended directories, potentially exposing sensitive data or causing unintended behavior. The CVSS score of 6.5 (medium severity) reflects the network attack vector with no privileges or user interaction required, and impacts confidentiality and integrity but not availability. No known exploits in the wild have been reported.
Mitigation Recommendations
A fix is available in i18next-http-backend version 3.0.5, which includes proper sanitization of user-controlled parameters. Users should upgrade to version 3.0.5 or later to fully remediate the vulnerability. If immediate upgrade is not possible, users should sanitize the lng and ns input values before they reach i18next by stripping characters such as '..', '/', '\', '?', '#', '%', whitespace, and control characters, and by limiting the input length. This workaround reduces the risk until the official fix can be applied.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-22T03:53:24.407Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69fcf7c7cbff5d86102fe190
Added to database: 5/7/2026, 8:36:23 PM
Last enriched: 5/7/2026, 8:51:41 PM
Last updated: 5/7/2026, 9:41:15 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.