CVE-2026-42353
JavaScript 취약성 분석 및 완화

Summary

Versions of i18next-http-middleware prior to 3.9.3 pass the user-controlled lng and ns values from getResourcesHandler directly into i18next.services.backendConnector.load(languages, namespaces, …) without any sanitisation. Depending on which backend is configured, the unvalidated path segments enable one of two attacks:

  • Filesystem path traversal when the middleware is paired with i18next-fs-backend (or any backend that interpolates lng / ns into a filesystem path).
  • Server-Side Request Forgery (SSRF) when the middleware is paired with i18next-http-backend (or any backend that interpolates into an HTTP URL). Example request:
GET /locales/resources.json?lng=../../etc/passwd&ns=root

with i18next-fs-backend reads the attacker-chosen file from disk; with i18next-http-backend reshapes the outgoing URL to target an internal service.

Impact

  • Arbitrary file read via fs-style backends — any file the Node process can read becomes reachable (source, configuration, .ssh keys, .env, Docker secrets, etc.).
  • SSRF via http-style backends — requests to internal IPs / hostnames not normally reachable from the internet; combined with cloud metadata endpoints this can escalate to credential theft.
  • Unbounded growth of i18next.options.ns — a now-incidental amplification: the pre-patch getResourcesHandler pushed every unique ns value into the shared i18next.options.ns singleton array without validation or bounds, enabling memory exhaustion from repeated unique payloads. The severity is bounded by the backend in place, but the middleware itself exposed the unsanitised path; this is the "weakest link" layer.

Affected versions

< 3.9.3.

Patch

Fixed in 3.9.3. The patch introduces utils.isSafeIdentifier and applies it in getResourcesHandler before lng and ns reach the backend connector:

languages  = languages.filter(utils.isSafeIdentifier)
namespaces = namespaces.filter(utils.isSafeIdentifier)

isSafeIdentifier uses a denylist approach — it still accepts any legitimate i18next language-code shape (i18next FAQ) — rejecting:

  • .. sequences (relative path traversal)
  • path separators (/, \)
  • control characters (C0/C1)
  • prototype keys (__proto__ / constructor / prototype)
  • empty strings and values longer than 128 characters Unsafe values are dropped; only safe values reach the backend. The fix is a defence-in-depth layer on top of any sanitisation the backend itself may apply.

Workarounds

No workaround short of upgrading. Front-proxying the middleware with a WAF rule that rejects requests containing .., /, \, or URL-structure characters in lng / ns is a partial mitigation. Upgrading the configured backend (i18next-fs-backend ≥ 2.6.4, i18next-http-backend ≥ 3.0.5) also closes the same attack at the next layer.

  • GHSA-5fgg-jcpf-8jjw — prototype pollution via setPath and missingKeyHandler. Independently fixable, filed separately per CNA rules.
  • GHSA-c3h8-g69v-pjrg — HTTP response splitting + XSS-filter bypass (CVE-2026-41683).

Credits

Discovered via an internal security audit of the i18next ecosystem.

Resources


근원네비디(NVD)

관련 JavaScript 취약점:

CVE ID

심각도

점수

기술

구성 요소 이름

CISA KEV 익스플로잇

수정 사항이 있습니다.

게시된 날짜

CVE-2026-42449HIGH8.5
  • JavaScriptJavaScript
  • n8n-mcp
아니요Apr 30, 2026
CVE-2026-40171HIGH8.4
  • JavaScriptJavaScript
  • notebook
아니요Apr 30, 2026
CVE-2026-42353HIGH8.2
  • JavaScriptJavaScript
  • i18next-http-middleware
아니요Apr 29, 2026
CVE-2026-42349HIGH7.6
  • JavaScriptJavaScript
  • @clerk/clerk-js
아니요Apr 30, 2026
GHSA-wg4g-395p-mqv3MEDIUM4.3
  • JavaScriptJavaScript
  • n8n-mcp
아니요Apr 25, 2026

무료 취약성 평가

클라우드 보안 태세를 벤치마킹합니다

9개의 보안 도메인에서 클라우드 보안 관행을 평가하여 위험 수준을 벤치마킹하고 방어의 허점을 식별합니다.

평가 요청

추가 Wiz 리소스

맞춤형 데모 받기

맞춤형 데모 신청하기

"내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다."
데이비드 에슬릭최고정보책임자(CISO)
"Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다."
아담 플레처최고 보안 책임자(CSO)
"우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다."
그렉 포니아토프스키위협 및 취약성 관리 책임자