提交 #838686: antlr ANTLR4 4.13.2 Path Traversal tokenVocab File Read信息

标题antlr ANTLR4 4.13.2 Path Traversal tokenVocab File Read
描述The `tokenVocab` grammar option in ANTLR4 specifies a `.tokens` vocabulary file to import. The option value is used directly to construct a file path as `lib_directory + "/" + vocabName + ".tokens"` without any path traversal validation. An attacker-controlled grammar file (or library directory path) can read arbitrary `.tokens` files from anywhere on the filesystem, with the file content appearing verbatim in error messages. Confirmed: ANTLR4 4.13.2 reads and reports the content of `/tmp/secret_tokens.tokens` when `tokenVocab=secret_tokens` and `-lib /tmp` are specified.
来源⚠️ https://github.com/wooyun123/wooyun/issues/8
用户
 jiazhou (UID 89028)
提交2026-05-27 12時14分 (1 月前)
管理2026-06-27 20時28分 (1 month later)
状态已接受
VulDB条目374497 [antlr ANTLR4 直到 4.13.2 tokenVocab Grammar Option TokenVocabParser.java getImportedVocabFile 目录遍历]
积分20

Do you want to use VulDB in your project?

Use the official API to access entries easily!