Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local low-privilege account on build server
-
DeliveryMonitor or trigger Maven build invoking antlr4-maven-plugin
-
ExploitIdentify TOCTOU race window in GrammarDependencies.java ObjectInputStream.readObject()
-
ExecutionReplace grammar dependency file between check and use operations
-
ImpactAchieve limited read/write/availability impact on build artifacts
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
|
| Exploitation Conditions | Exploitation requires a local operating system session on the machine executing the Maven build, with at least low-level OS privileges (PR:L per CVSS 4.0 vector). The antlr4-maven-plugin must be actively invoked as part of a Maven build lifecycle - the vulnerability exists only when GrammarDependencies.java is processing cached grammar dependency serialization. The attacker must win a file-system race condition between the check and use operations, which the description explicitly labels as requiring 'a high degree of complexity' and notes that 'exploitability is difficult.' Exploitation is limited to the build-time environment; this is not a production runtime attack surface. No network access is involved. What limits exploitation: strict local-only access requirement, high-complexity race timing, limited impact (low across confidentiality, integrity, and availability), and the attack applies only to Java projects using ANTLR4's Maven plugin during active build execution. |
| Impact | The CVSS 4.0 base score of 1.1 (vector AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N with exploit maturity E:P) accurately represents a low-priority vulnerability. All impact dimensions are Low, attack vector is strictly Local, complexity is High (race condition timing required), and no scope change affects subsequent systems. A publicly available proof-of-concept (GitHub issue) elevates the E:P modifier but does not materially change real-world risk given the high complexity bar. The vulnerability is absent from CISA KEV, and the description explicitly notes that 'exploitability is difficult.' No EPSS score was provided in the input data, so probabilistic exploitation likelihood cannot be numerically quantified. CVSS indicates local vector and this is fully consistent with the description - no conflict exists. The vendor was unresponsive to disclosure, which means no official advisory or patch version exists, leaving organizations reliant on compensating controls. For development teams using this Maven plugin, the risk is real but extremely low in practice: an attacker would need local access to the build system, low operating system privileges, and precise race-condition timing - all simultaneously - to achieve only limited impact. |
| Exploit ScenarioDerived | A local attacker with a low-privileged shell account on a shared CI/CD build server initiates or monitors a Maven build that invokes antlr4-maven-plugin. During the brief interval between GrammarDependencies.java checking the grammar dependency file and consuming it via ObjectInputStream.readObject(), the attacker replaces the file on disk with a crafted substitute. If the race is won, the plugin processes the attacker-controlled dependency data, yielding limited read, write, or availability impact on the resulting build artifacts. A publicly available proof-of-concept exists at https://github.com/wooyun123/wooyun/issues/7 demonstrating this race condition. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 28, 2026
Time-of-check time-of-use (TOCTOU) race condition in antlr4-maven-plugin up to version 4.13.2 allows a local low-privileged attacker to manipulate grammar dependency state between validation and consumption in ObjectInputStream.readObject() within GrammarDependencies.java, yielding limited confidentiality, integrity, and availability impact on build artifacts. No public exploit identified at time of analysis is incorrect here - a publicly available exploit exists via a GitHub issue, though KEV listing is absent, indicating no confirmed widespread active exploitation. The CVSS 4.0 score of 1.1 reflects genuine low real-world risk due to local-only access, high attack complexity, and constrained impact scope.
RemediationAI
No vendor-released patch has been identified at time of analysis - the vendor did not respond to coordinated disclosure. Teams using antlr4-maven-plugin should consider pinning to the latest 4.13.2 release and monitoring the upstream ANTLR4 GitHub repository for any subsequent releases that address this issue. As a compensating control, restrict write access to the Maven local repository cache and build working directories so that only the build service account can write to these paths, reducing the feasibility of file substitution during the TOCTOU window. Running Maven builds in isolated, ephemeral containers (e.g., Docker build stages with read-only bind mounts for dependency caches) eliminates the local attacker's ability to race the file operation, though this introduces build infrastructure overhead. Disabling grammar dependency caching in the plugin, if the configuration supports it, would eliminate the ObjectInputStream.readObject() code path entirely, but this may significantly increase incremental build times. Reference the POC at https://github.com/wooyun123/wooyun/issues/7 to understand the race window and validate whether mitigations are effective in your specific build environment.
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 Java-based parser generator widely used in compiler and language tooling projects. The affected component is the antlr4-maven-plugin (CPE: cpe:2.3:a:antlr:antlr4:*:*:*:*:*:*:*:*), which automates grammar compilation during Maven builds. The vulnerable code path is in GrammarDependencies.java, which calls ObjectInputStream.readObject() to deserialize cached grammar dependency data from disk. CWE-367 (Time-Of-Check Time-Of-Use) describes the root cause: the plugin reads a file handle or path reference, validates or checks a property of the object (e.g., file integrity, class type), and then proceeds to use the data - but a race window between check and use allows a concurrent local process to swap or modify the underlying file. Java's ObjectInputStream.readObject() is historically sensitive to the deserialization of unexpected class graphs; in this TOCTOU context, the attacker exploits the gap rather than a pure gadget-chain deserialization flaw. The plugin runs at build time, not production runtime, which significantly constrains the attack surface.
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:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Local-only race condition requiring low privileges and high complexity; limited impact across all three dimensions with no scope change.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
1DescriptionCVE.org
A flaw has been found in antlr ANTLR4 up to 4.13.2. This affects the function ObjectInputStream.readObject of the file antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/GrammarDependencies.java of the component Maven Plugin. This manipulation causes time-of-check time-of-use. The attack is restricted to local execution. A high degree of complexity is needed for the attack. It is indicated that the exploitability is difficult. The exploit has been published 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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Path traversal in ANTLR4 up to 4.13.2 exposes arbitrary file read via the tokenVocab grammar option handler. The vulnera
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
EUVD-2026-40000
GHSA-h73j-vjhq-j9vg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB