glibcのgettextで環境変数LANGUAGEを介したディレクトリトラバーサルの脆弱性
Summary
glibcのgettext関連関数に、環境変数LANGUAGEの値で任意の場所のメッセージカタログ(.moファイル)を読み込まれるディレクトリトラバーサルの脆弱性が見つかりました。細工したファイルを使うとプログラムがクラッシュしたり、権限の範囲で任意のコードを実行されたりするおそれがあります。対象はバージョン2.0以降のglibcで、修正版は公開されていません。最新の情報を確認してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
glibcのgettext関連関数に、環境変数LANGUAGEの値で任意の場所のメッセージカタログ(.moファイル)を読み込まれるディレクトリトラバーサルの脆弱性が見つかりました。細工したファイルを使うとプログラムがクラッシュしたり、権限の範囲で任意のコードを実行されたりするおそれがあります。対象はバージョン2.0以降のglibcで、修正版は公開されていません。最新の情報を確認してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| The GNU C Libraryglibc |
≥ 2.0 (no fix yet)→ Not listed |
Not listed |
This record does not list fixed versions. Check the article or the vendor advisory in the references for whether and where it is fixed.
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- BellSoft Alpaquita BELL-CVE-2026-84243 glibc Fix available
- Debian DEBIAN-CVE-2026-84243 glibc No fixed version in this record
- Ubuntu UBUNTU-CVE-2026-84243 glibc Fix available
Original description The description as published by the source.
The gettext family of functions in the GNU C Library version 2.0 and later accept LANGUAGE environment variable entries that contain '/' or that are equal to "..", unless the program is setuid or setgid (AT_SECURE). An attacker who can set LANGUAGE in the environment of a program that uses gettext can make it load a message catalog (.mo file) from an arbitrary location in the file system. A crafted .mo file can crash the program through out-of-range offsets, or supply translations whose format directives do not match the arguments passed by the program. That causes undefined behaviour in the printf family of functions and may allow arbitrary code execution with the privileges of the program. The safety of message catalogs relies on them being installed in trusted, read-only locations, and the directory traversal bypasses this.
The fix for CVE-2014-0475 rejects ".." path components in locale names passed to setlocale or taken from the LC_ALL, LC_* and LANG environment variables. gettext reads LANGUAGE directly and appends each colon-separated entry to the message catalog directory, so that fix did not cover LANGUAGE.
LANGUAGE is only used when the LC_MESSAGES locale is not "C", "C." or "POSIX", so the attacker must also be able to select another installed locale, for example through LANG or LC_ALL. Exploitation also requires that the attacker can place the crafted file in a location readable by the target program, and that the environment crosses a trust boundary witho…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- REDHAT Red Hat
- web sourceware.org
- web sourceware.org
- web inbox.sourceware.org
- web nvd.nist.gov
- web github.com