CVE-2026-144324: i18n: Path traversal via object-form locale in i18n (__, __n, getStorageFilePath)
i18n is a lightweight translation module for Node.js and Express.js with dynamic JSON storage. Prior to 0.15.4, i18n.({ phrase, locale }) and i18n.n({ ..., locale }) pass an unsanitized locale to getStorageFilePath, whose path normalization does not reject traversal outside the configured locales directory. An application that forwards attacker-controlled locale values can read a named key from a valid JSON file, expose a previously loaded catalog through getCatalog, create an attacker-named JSON file when updateFiles is enabled, or cause a narrow denial of service by renaming a path after a failed read. Applications using only middleware or setLocale are not affected because that path restricts locales to the configured set. This issue is fixed in version 0.15.4.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.15.4
Event History
Frequently Asked Questions
Which applications are actually exposed to this issue?
Applications are exposed if they use i18n.__ with an object-form locale or i18n.__n with a locale value that can be controlled by an attacker. Applications that use only middleware or setLocale are not affected, because those paths limit locales to the configured set.
What could an attacker do with control of the locale value?
Depending on application behavior and configuration, an attacker may read a named key from a valid JSON file, expose a catalog that was previously loaded through getCatalog, create an attacker-named JSON file when updateFiles is enabled, or trigger a narrow denial of service by renaming a path after a failed read.
What should be done if an immediate upgrade is not possible?
Do not forward untrusted locale values into the object-form i18n.__ or i18n.__n APIs. Restrict locale input to the configured locale set and avoid enabling updateFiles where it is not required.
How can I determine whether my deployment is affected?
Review calls to i18n.__({ phrase, locale }) and i18n.__n({ ..., locale }) for locale values derived from requests or other untrusted input. Versions prior to 0.15.4 are affected when those APIs receive unsanitized locale values.