Repository navigation
fix(deps): updated i18next-http-backend to 4.0.2 - #41
Merged
Merged
Conversation
Resolved Dependabot alert GHSA-xvq9-wjp8-hwqf (incomplete URL validation permits SSRF, low). The fix only exists in 4.0.2; the 3.x line ends at 3.0.6, so the previous ^3.0.6 range could never resolve to a patched release and a direct major update was required. Breaking changes in 4.0 checked against this app: * cross-fetch dropped, host fetch required - the backend only runs in the browser (Vite SPA/PWA), where native fetch is always present * Node >= 18 required - CI and Docker build use Node 24 (.nvmrc) * package exports map and default export unchanged, so the existing `import ... from 'i18next-http-backend'` and loadPath config stay as they are; no source changes needed Lockfile now drops cross-fetch and the node-fetch subtree (node-fetch, whatwg-url, tr46, webidl-conversions) that only 3.x pulled in. No npm overrides were added.
|
🎉 This PR is included in version 0.1.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Dependabot alert #65 (GHSA-xvq9-wjp8-hwqf, low):
i18next-http-backend< 4.0.2 does not reject:inlng/nsvalues, so aloadPathtemplate that starts with a placeholder can be turned into an absolute URL (SSRF / URL injection). It is a direct runtime dependency.The only patched release is 4.0.2. The 3.x line ends at 3.0.6, so the existing
^3.0.6range can never resolve to a fixed version - an in-range lockfile update is not possible and a direct major update is required. Nooverridesare used.Note: this app's
loadPathis${import.meta.env.BASE_URL}locales/{{lng}}/...json(leading path), which the advisory lists as not affected - so this is hygiene that clears the alert rather than an active exploit fix.What
i18next-http-backend:^3.0.6->^4.0.2(package.json + package-lock.json)cross-fetchand thenode-fetchsubtree (node-fetch,whatwg-url,tr46,webidl-conversions) that only 3.x pulled inProof it does not break
4.0 changelog breaking changes checked against how the app uses the backend (
src/i18n.ts):cross-fetchdropped, hostfetchrequiredfetch.nvmrc, CI and the Dockerfile use Node 24sideEffects: falseexportsmap and default export unchanged;import ... from 'i18next-http-backend',.use(...)and theloadPathoption keep working. The backend is referenced by.use(), so it is not tree-shaken away4.0.1 (allow
@inns) and 4.0.2 (reject:inlng/ns,//inns) only tighten/relax validation; the app uses BCP-47 codes and the defaulttranslationnamespace, which are unaffected.CI on this PR:
🔍 PR Validation / 🧪 Build & Test(automation-templatesnodejs-build.yml) runsnpm ci(frozen lockfile), type check, the vitest unit tests,vite buildandnpm audit --audit-level=high.Left open