unstale

npm / i18next-http-backend

i18next-http-backend

What changed in i18next-http-backend 2 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-25.

12 breaking7 security1 new APIs and options1 performance2 behavior and defaults1 tooling8 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

i18next-http-backend 420 changes

Breaking changes 8

  • Requests are refused when a URL’s scheme or authority differs from the template produced by loadPath or addPath, preventing plain lng or ns values from redirecting requests.

    4.0.10release notes

  • Values containing &, = or ; are rejected to prevent query parameter pollution when lng is interpolated into query-shaped loadPath or addPath templates.

    4.0.4release notessecurity advisory

  • Values containing &, = or ; are rejected to prevent query parameter pollution when ns is interpolated into query-shaped loadPath or addPath templates.

    4.0.4release notes

  • Values containing : are now rejected to prevent URL injection when a loadPath or addPath template starts with a placeholder.

    4.0.2release notes

  • Values containing : or // are now rejected to prevent URL injection when a loadPath or addPath template starts with a placeholder.

    4.0.2release notes

  • The minimum supported Node version is now 18, so projects using older Node versions must upgrade or stay on v3.x.

    4.0.0release notes

  • The backend no longer provides cross-fetch and requires a host-provided fetch; runtimes without native fetch need a ponyfill injected through options.alternateFetch or must stay on v3.x.

    4.0.0release notes

  • XHR and ActiveXObject are still detected when provided by the host, but are no longer polyfilled.

    4.0.0release notes

Security 2

  • The interpolated URL is now checked as a whole, preventing requests to protocol-relative URLs when loadPath or addPath templates do not start with // or \.

    4.0.3release notessecurity advisory

  • i18next-http-backend incomplete URL validation permits SSRF

    4.0.2security advisory

New APIs and options 1

  • Use options.alternateFetch to inject a fetch ponyfill, mock fetch in tests, or intercept requests.

    4.0.0release notes

Performance 1

  • The package declares sideEffects as false, enabling downstream bundlers to apply tree-shaking accordingly.

    4.0.0release notes

Behavior and default changes 2

  • With i18next 26.7.1 or later, reloads current and clone-loaded languages and retries bundles that failed to load.

    4.0.9release notes

  • With i18next 26.7.0 or later, reloads use services.utils.reloadResources, including i18next's retries and the loaded event; the same fallback and preload languages are reloaded.

    4.0.8release notes

Fixes and other changes 6

  • Errors thrown by a fetch request callback are rethrown instead of being passed to the callback a second time, avoiding duplicate reads and incorrectly failed namespaces.

    4.1.0release notes

  • The backend declares its callback API so i18next 26.7.0 or later calls read and create with callbacks and passes create its options.

    4.0.8release notes

  • Query string parameters are added before a URL fragment in loadPath and addPath, so the server receives them; URLs without fragments are unchanged.

    4.0.7release notes

  • Synchronous XHR errors are now passed to the callback, allowing i18next to take its usual failed-load path instead of leaving init() unresolved.

    4.0.6release notes

  • When a loadPath function’s promise rejects, the error is reported to i18next through its usual failed-load path, and init() resolves instead of hanging or causing an unhandled rejection in Node.

    4.0.5release notes

  • Allows @ in ns values so scoped-package-style namespace names fetch correctly; @ remains blocked for lng.

    4.0.1release notes

i18next-http-backend 311 changes

Breaking changes 4

  • Request URLs are no longer built when lng values contain unsafe URL or path characters, control characters, prototype keys, or exceed 128 characters; legitimate i18next language-code shapes remain supported.

    3.0.5release notes

  • Request URLs are no longer built when ns values contain unsafe URL or path characters, control characters, prototype keys, or exceed 128 characters.

    3.0.5release notes

  • Backend path interpolation supports only {{lng}} and {{ns}}; custom interpolation prefix and suffix from i18next config no longer apply.

    3.0.4release notes

  • Backend path interpolation supports only {{lng}} and {{ns}}; custom interpolation prefix and suffix from i18next config no longer apply.

    3.0.4release notes

Security 5

  • addQueryString iterates only own enumerable keys and guards against prototype keys, preventing prototype-pollution amplification into URLs.

    3.0.5release notes

  • The customHeaders loop in XHR mode iterates only own enumerable keys and guards against prototype keys, preventing prototype-pollution amplification into request headers.

    3.0.5release notes

  • Control characters are stripped from lng, ns, and URL values before they appear in error-callback strings, preventing log forging.

    3.0.5release notes

  • URLs are redacted to remove user:password credentials before they appear in error-callback strings, preventing basic-auth credential leaks.

    3.0.5release notes

  • i18next-http-backend has Path Traversal & URL Injection via Unsanitised lng/ns

    3.0.5security advisory

Fixes and other changes 2

  • Namespace values can contain forward slashes again, allowing nested namespace names to fetch correctly through loadPath.

    3.0.6release notes

  • The fetch-options-stripping fallback is scoped to one backend instance, so a not-implemented fetch error no longer strips requestOptions from other instances in the process.

    3.0.5release notes

i18next-http-backend 21 changes

Tooling 1

  • TypeScript support was updated for the major i18next version.

    2.0.0release notes