Back to Blog
critical SEVERITY6 min read

How Prototype Pollution Happens in i18next-fs-backend and How to Fix It

A critical prototype pollution vulnerability (CVE-2026-48713) was discovered in i18next-fs-backend versions prior to 2.6.6, where specially crafted missing-key strings could pollute the JavaScript object prototype. This fix upgrades the dependency to patch the vulnerability and prevent attackers from injecting malicious properties into application objects.

O
By Orbis AppSec
•Technically reviewed by Anupam Mediratta•Published September 6, 2026•Reviewed September 6, 2026

Answer Summary

CVE-2026-48713 is a prototype pollution vulnerability in the i18next-fs-backend Node.js package (CWE-1321) that allows attackers to inject properties into the JavaScript object prototype through crafted missing-key strings. The fix upgrades i18next-fs-backend from version 2.6.1 to 2.6.6, which contains hardened input validation to prevent the pollution attack vector. This one-line dependency update in package.json eliminates the attack surface without requiring any source code changes.

Vulnerability at a Glance

cweCWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)
fixUpgrade i18next-fs-backend to version 2.6.6, which implements input validation to prevent prototype pollution
riskAttackers can inject arbitrary properties into the Object prototype, potentially causing denial of service, authentication bypass, or arbitrary code execution
languageJavaScript/Node.js
root causei18next-fs-backend 2.6.1 and earlier did not properly validate missing-key strings before using them in object property operations
vulnerabilityPrototype Pollution via Crafted Missing-Key String

How Prototype Pollution Happens in i18next-fs-backend and How to Fix It

Introduction

In the application's dependency chain, a critical prototype pollution vulnerability was lurking in i18next-fs-backend, a popular Node.js package for managing translation files on the filesystem. The vulnerability (CVE-2026-48713) could allow attackers to inject arbitrary properties into the JavaScript Object prototype through specially crafted missing-key strings—a seemingly innocent input that could cascade into a complete application compromise.

The yarn.lock file revealed that the project was running i18next-fs-backend version 2.6.1, which contained the vulnerable code path. This file handles internationalization (i18n) configuration and translation key resolution, making it a critical component in the application's localization pipeline. When the i18next-fs-backend processes translation requests, it handles cases where requested keys don't exist in the translation files. This error-handling path is where the vulnerability was introduced.

The Vulnerability Explained

What is Prototype Pollution?

Prototype pollution is a JavaScript-specific vulnerability where an attacker manipulates the Object prototype—the base object from which all other objects inherit properties. By injecting malicious properties into Object.prototype, an attacker can affect every object in the application, potentially leading to:

  • Authorization bypass: Injecting isAdmin: true into all objects
  • Denial of service: Polluting critical properties to crash the application
  • Remote code execution: In some contexts, injecting function properties that get executed
  • Data exfiltration: Modifying object behavior to leak sensitive information

The Attack Vector in i18next-fs-backend

The vulnerability exists in how i18next-fs-backend version 2.6.1 processes missing translation keys. When a translation key is requested but doesn't exist in the translation files, the library logs or processes this missing key. However, the vulnerable code didn't properly validate the missing-key string before using it in object operations.

Consider this attack scenario:

// Attacker-controlled input: a crafted missing key
const missingKey = "__proto__.isAdmin";

// Vulnerable code in i18next-fs-backend 2.6.1 might do something like:
const missingKeyObject = {};
missingKeyObject[missingKey] = true;  // This pollutes Object.prototype!

// Now in the application:
const user = {};
console.log(user.isAdmin);  // true - POLLUTED!

When a developer uses a missing translation key like __proto__.isAdmin or constructor.prototype.isAdmin, the vulnerable version would set properties directly on the prototype chain, affecting all objects instantiated after the pollution occurs.

Real-World Impact

In a production application using this vulnerable version, an attacker could:

  1. Craft a URL or API request with a specially formatted missing translation key
  2. The key gets processed by i18next-fs-backend without proper validation
  3. The prototype gets polluted with arbitrary properties
  4. All subsequent object checks fail or succeed unexpectedly
  5. Authentication, authorization, and business logic could be bypassed

For example, if the application checks user.isAdmin to determine access levels, injecting isAdmin: true into the prototype would grant admin access to all users.

The Fix

The fix was straightforward but critical: upgrade i18next-fs-backend from version 2.6.1 to version 2.6.6.

Changes Made:

diff --git a/package.json b/package.json
index 0464f96c7..9ecd1eaec 100644
--- a/package.json
+++ b/package.json
@@ -191,7 +191,7 @@
     "i18next": "~25.8.17",
     "i18next-browser-languagedetector": "~8.2.1",
     "i18next-express-middleware": "~1.8.0",
-    "i18next-fs-backend": "~2.6.1",
+    "i18next-fs-backend": "~2.6.6",
     "i18next-http-backend": "~3.0.2",
     "i18next-http-middleware": "~3.9.2",
     "i18next-node-fs-backend": "~2.1.3",
diff --git a/yarn.lock b/yarn.lock
-"i18next-fs-backend@npm:~2.6.1":
-  version: 2.6.1
-  resolution: "i18next-fs-backend@npm:2.6.1"
-  checksum: 78a85714f92a029bb16818cfd45bd91322cd3b64e3c02b47d8b4c7ca82f00be762eda3b3ed032c17ef7b6482df91e78e27725f1bb2aa121101654abca91fcbe8
+"i18next-fs-backend@npm:2.6.6":
+  version: 2.6.6
+  resolution: "i18next-fs-backend@npm:2.6.6"
+  checksum: 0055e737379d29bac8230b057325e5d2e9311dd12cfd65ad1053fd78bade0d020d1a16b549de311b20c41106c50013019a22fe70d6e0585e07196f6a11c958ab

What Changed in v2.6.6?

The i18next-fs-backend maintainers implemented input validation in version 2.6.6 to prevent prototype pollution. While the exact implementation isn't shown in our diff (since we only updated the lock file), the fix likely includes:

  1. Sanitizing missing-key strings to reject or escape dangerous patterns like __proto__, constructor, and prototype
  2. Using safe object property access patterns that don't traverse the prototype chain for untrusted input
  3. Implementing allowlist validation for valid translation key formats
  4. Using Object.create(null) for internal objects to prevent prototype pollution

The upgrade from 2.6.1 to 2.6.6 represents a patch-level fix that addresses only the security issue without introducing breaking changes. This means the application maintains full behavioral compatibility while eliminating the attack vector.

Prevention & Best Practices

For Your Application:

  1. Keep dependencies updated: Regularly audit your package.json and yarn.lock files for vulnerable versions using tools like npm audit, yarn audit, or Snyk
  2. Use security scanning: Integrate Trivy, Snyk, or similar tools into your CI/CD pipeline to catch vulnerable dependencies before they reach production
  3. Implement dependency updates: Set up automated dependency updates (e.g., Dependabot) to receive security patches quickly

For Developers Writing i18n Code:

  1. Never use user input directly in object property assignments: Avoid patterns like obj[userInput] = value
  2. Validate translation key formats: Implement strict whitelisting for valid translation key patterns (typically alphanumeric with dots/underscores)
  3. Use Object.create(null): When creating objects to store configuration or translation data, use Object.create(null) to prevent prototype pollution
  4. Freeze critical objects: Use Object.freeze() on objects that shouldn't be modified

Detection and Monitoring:

  • Static analysis: Use Semgrep to detect prototype pollution patterns in your codebase
  • Runtime monitoring: Monitor for unexpected properties appearing on Object.prototype
  • Dependency scanning: Run npm audit regularly and integrate it into your CI/CD

Relevant Standards:

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes
  • CWE-94: Improper Control of Generation of Code ('Code Injection')
  • OWASP: See the Object Injection section in OWASP Top 10

Key Takeaways

  • Prototype pollution in i18next-fs-backend 2.6.1 allowed attackers to inject properties like __proto__.isAdmin through missing translation keys, affecting all application objects
  • The fix is a simple version bump to 2.6.6, which implements input validation to reject or sanitize dangerous key patterns
  • No source code changes were required because the vulnerability was entirely in a dependency, demonstrating the importance of keeping third-party packages updated
  • Trivy security scanning automatically detected this CVE against the vulnerable version in yarn.lock, preventing deployment to production
  • Prototype pollution is a JavaScript-specific threat that requires different defense strategies than traditional injection attacks—never trust user input in object property operations

How Orbis AppSec Detected This

Source: The vulnerability enters through translation key resolution in i18next-fs-backend, where any missing translation key string could be attacker-controlled (via API requests, configuration files, or user input)

Sink: The vulnerable code path in i18next-fs-backend versions ≤2.6.1 that processes missing keys without proper validation, potentially using them in object property assignments

Missing Control: Input validation and sanitization of translation key strings to prevent prototype pollution patterns like __proto__, constructor, and prototype

CWE: CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)

Fix: Upgrade i18next-fs-backend from 2.6.1 to 2.6.6, which implements input validation to prevent prototype pollution attacks

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.

Conclusion

Prototype pollution vulnerabilities are particularly dangerous because they're JavaScript-specific, hard to detect without proper tooling, and can have cascading effects throughout an application. The fix for CVE-2026-48713 demonstrates the importance of keeping dependencies updated and using automated security scanning in your development pipeline.

By upgrading i18next-fs-backend to version 2.6.6, the application eliminated a critical attack vector that could have led to authentication bypass, authorization failures, or denial of service. This straightforward patch update—changing just two version numbers in package.json and yarn.lock—removed the vulnerability without requiring any changes to application code.

Make it a practice to:
- Run npm audit or yarn audit regularly
- Integrate security scanning into your CI/CD pipeline
- Keep dependencies updated, especially security patches
- Understand the vulnerabilities in your supply chain, not just your own code

Security is a shared responsibility, and staying vigilant about dependency vulnerabilities is just as important as securing your own code.

Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #1011

Related Articles

high

js-yaml 5.2.1 DoS: Exponential Parsing in Flow Collections

A denial-of-service vulnerability in js-yaml 5.2.1 allows an attacker to crash the parser by supplying deeply nested flow collections that trigger exponential parsing behavior. The fix in version 5.2.2 improves the parser's handling of these structures, preventing the algorithmic complexity attack. This is critical for any service accepting user-controlled YAML input.

high

Anthropic API Adapter Prototype Pollution in parseToolCallInput

The `parseToolCallInput` function in the Anthropic API adapter used `JSON.parse` without protecting against prototype pollution keys. An attacker who could manipulate API responses—through a man-in-the-middle attack, compromised Codex backend, or DNS spoofing—could inject `__proto__`, `constructor`, or `prototype` properties to pollute JavaScript's Object prototype and affect extension runtime behavior.

high

load_localStorage.js JSON Parse: Prototype Pollution via __proto__

The load_localStorage.js utility parsed JSON configuration without validating keys, permitting prototype pollution through malicious `__proto__`, `constructor`, or `prototype` properties. An attacker with filesystem access could poison downstream JavaScript execution by injecting these special keys into the loaded data structure.

critical

How Arbitrary Code Execution Happens in protobufjs and How to Fix It

CVE-2026-41242 is a critical vulnerability in protobufjs versions 8.0.0 and earlier that allows attackers to execute arbitrary code by injecting malicious type fields into protobuf definitions. The fix upgrades the dependency from `^8.0.0` to `^8.6.6` in `core/package.json`, eliminating the unsafe code path that processed attacker-controlled type metadata without validation.

critical

How Type Confusion Vulnerabilities Happen in JavaScript Dependencies and How to Fix Them

A critical type confusion vulnerability (CVE-2021-23436) was discovered in immer 9.0.7, a popular immutable state management library used in the client application. By upgrading to immer 9.0.6, the vulnerability was patched, eliminating a flaw that could have allowed attackers to bypass previous security fixes (CVE-2020-28477). This fix demonstrates why keeping dependencies current is essential for maintaining application security.

critical

ADMIN_HASH Interpolated Into mysql -e: Hex-Encoding the Seed Insert

A container setup script seeds the first administrator account by splicing the shell variable `$ADMIN_HASH` into a quoted SQL literal passed to `mysql -e`. The fix hex-encodes the value with `xxd -p` and decodes it inside MySQL with `unhex()`. No quote character from the shell can now reach the SQL parser. This is a defence-in-depth hardening, not a demonstrated exploit, but it closes off a channel that could have planted extra administrator rows at install time.