mediumCVSS 6.5Vulnerability

GHSA-mgcp-mfp8-3q45

### Summary Versions of `i18next-locize-backend` prior to 9.0.2 interpolate `lng`, `ns`, `projectId`, and `version` directly into the configured `loadPath` / `privatePath` / `addPath` / `updatePath` / `getLanguagesPath` URL templates with no path-component validation and no encoding. When an application exposes any of these values to user-controlled input (`?lng=` / `?ns=` query parameters via `i18next-browser-languagedetector`, cookies, request headers, or a URL-derived `projectId`), a crafted value can change the structure of the outgoing request URL. Affected call sites in `lib/index.js` (pre-patch): the `interpolate()` helper is used at the five URL-build sites — `_readAny`/`read` (line 415 for private, 426 for public), `getLanguages` (lines 271 and 296), and `writePage` (lines 616 and 622) for the missing-key and update POST paths. The helper `interpolate` in `lib/utils.js` substitutes raw values with no encoding. ### Impact An attacker who can influence `lng`, `ns`, `projectId`, or `version` can: - **Path traversal** — `lng = '../../admin'` against `https://api.locize.app/{{projectId}}/{{version}}/{{lng}}/{{ns}}` changes the request URL path segment that reaches the locize CDN / API. - **Query-string injection** — `lng = 'en?x=y'` appends an attacker-chosen query to the URL. - **Fragment truncation** — `lng = 'en#x'` silently truncates the path in browser fetches. - **URL-encoded bypass** — `lng = 'en%2F..'` leverages server-side decoding to reintroduce `/..`. The worst-case concrete impact is loading an unintended translation resource (potentially causing wrong content to render) and, when a custom `loadPath` is configured against an internal / file-scheme URL, **SSRF or arbitrary-file read** on the host running the backend. Additionally, the pre-patch `interpolate()` function read `data[key]` without excluding prototype-chain properties — under prototype-pollution conditions in the same process, that path could pull values from `Object.prototype` into

Properties

ghsa_id
GHSA-mgcp-mfp8-3q45
severity
medium
summary
i18next-locize-backend has URL Injection via Unsanitized Path Parameters
cvss_score
6.5
cve_id
GHSA-mgcp-mfp8-3q45
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
is_ghsa_only
true
ghsa_published
2026-04-22T20:28:27Z
source_url
https://github.com/advisories/GHSA-mgcp-mfp8-3q45
ghsa_updated
2026-04-22T20:28:27Z

Related Entities (5)

VULNERABLE_TO (1)

[Software]npm/i18next-locize-backend

AFFECTS (1)

[Software]npm/i18next-locize-backend

HAS_WEAKNESS (2)

[Weakness]Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
[Weakness]Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph