Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft grammar file with tokenVocab traversal payload
-
DeliverySubmit or inject grammar into target build pipeline
-
ExploitANTLR4 tool invoked on malicious grammar
-
ExecutiongetImportedVocabFile resolves traversal path
-
PersistSensitive file contents read from host filesystem
-
ImpactData exfiltrated via build logs or output artifacts
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that an attacker control or influence the value of the tokenVocab grammar option within an ANTLR4 grammar (.g4) file that is processed by the ANTLR4 build tool (versions through 4.13.2). Specifically, the tokenVocab option value must be set to a path-traversal string (e.g., ../../target/file) in a grammar file that is fed to the ANTLR4 tool during compilation. This is not a runtime web service vulnerability - the ANTLR4 tool must be invoked on a grammar file the attacker can influence. Exploitation is limited to environments where untrusted or attacker-controlled grammar files are processed (e.g., build systems ingesting external grammar dependencies, open-source contribution workflows, or developer workstations cloning attacker-controlled repositories). The impact is limited to file read (VC:L); write and execution are not achievable through this path. The CVSS 4.0 PR:N indicates no authentication is required to include a malicious tokenVocab value in a grammar file. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N) scores 6.9 and signals a low-complexity, unauthenticated network-reachable path traversal with limited confidentiality impact and no integrity or availability impact. The E:P supplemental metric confirms a public proof-of-concept. EPSS data was not provided, which is a gap - without it, exploitation likelihood cannot be quantified independently. KEV status is negative, meaning CISA has not confirmed active exploitation. Real-world risk is moderate: ANTLR4 is primarily a developer and build tool, so the attack surface is constrained to CI/CD pipelines and developer workstations that process externally sourced or attacker-influenced grammar files. The impact is read-only file disclosure (VC:L), not code execution, limiting blast radius. However, in CI environments, sensitive files such as credentials, tokens, or private keys in the build workspace could be exfiltrated. The absence of a vendor response and no patch raises the effective risk, as no official remediation path exists. The public POC lowers the barrier for exploitation significantly. |
| Exploit ScenarioDerived | An attacker contributes or injects a malicious ANTLR4 grammar file into a repository or dependency source, embedding a tokenVocab option value containing a path traversal sequence such as ../../../../home/user/.ssh/id_rsa. When a developer or automated CI/CD pipeline runs the ANTLR4 tool against this grammar, getImportedVocabFile resolves the traversal path and reads the target file's contents. A public proof-of-concept for this technique is available on GitHub, lowering the technical barrier for exploitation against any build environment processing untrusted grammar inputs. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 28, 2026
Path traversal in ANTLR4 up to 4.13.2 exposes arbitrary file read via the tokenVocab grammar option handler. The vulnerable function getImportedVocabFile in TokenVocabParser.java fails to sanitize user-controlled grammar option values, allowing an attacker to supply a crafted .g4 grammar file that causes the tool to read files outside the intended working directory. A publicly available proof-of-concept exploit exists (GitHub issue reference), and no vendor patch has been released - the vendor did not respond to disclosure. No active exploitation is confirmed in CISA KEV, but the CVSS 4.0 E:P flag confirms exploit code is public.
RemediationAI
No vendor-released patch has been identified at the time of analysis - the vendor did not respond to the coordinated disclosure. As a primary compensating control, avoid processing grammar files from untrusted or externally controlled sources; restrict the ANTLR4 tool to only processing grammar files from trusted, version-controlled repositories. In CI/CD pipelines, implement filesystem sandbox restrictions (e.g., using Docker with read-only volume mounts or seccomp profiles) to limit the directories accessible to ANTLR4 during grammar processing - this mitigates the traversal without requiring a code fix but adds pipeline configuration overhead. Additionally, review any tokenVocab grammar option values in .g4 files for path traversal characters (../) before build execution. Monitor the upstream ANTLR4 repository at https://github.com/antlr/antlr4 and the VulDB entry https://vuldb.com/vuln/374497 for patch availability. The public exploit is tracked at https://github.com/wooyun123/wooyun/issues/8.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
ANTLR4 (ANother Tool for Language Recognition, version 4) is a widely used Java-based parser generator. The affected code path is in tool/src/org/antlr/v4/parse/TokenVocabParser.java, specifically the getImportedVocabFile function, which handles the tokenVocab grammar option. This option instructs ANTLR4 to load token vocabulary definitions from an external file. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - Path Traversal): the function does not canonicalize or validate the file path derived from the tokenVocab grammar option value, allowing sequences like ../../etc/passwd to escape the project directory. The CPE cpe:2.3:a:antlr:antlr4:*:*:*:*:*:*:*:* confirms all versions through 4.13.2 are affected. Because ANTLR4 is a build-time tool run in developer environments and CI/CD pipelines, the attack surface exists wherever untrusted grammar files are processed.
Know when Antlr4 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P
Network-reachable build tool processing untrusted grammar files; no authentication or interaction required; impact limited to low-confidentiality file read only.
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
1DescriptionCVE.org
A vulnerability was detected in antlr ANTLR4 up to 4.13.2. Affected by this issue is the function getImportedVocabFile of the file tool/src/org/antlr/v4/parse/TokenVocabParser.java of the component tokenVocab Grammar Option Handler. The manipulation results in path traversal. The attack can be executed remotely. The exploit is now public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Code injection in ANTLR4's Grammar Action Block Handler allows remote attackers to execute arbitrary code by supplying a
Command injection in ANTLR4's Go code generation target (GoTarget.java) allows a local low-privilege attacker to execute
Time-of-check time-of-use (TOCTOU) race condition in antlr4-maven-plugin up to version 4.13.2 allows a local low-privile
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-40001
GHSA-w346-wxvq-p3xr
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB