Skip to main content

ANTLR4 Maven Plugin CVE-2026-13502

| EUVDEUVD-2026-40000 LOW
Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367)
2026-06-28 VulDB GHSA-h73j-vjhq-j9vg
1.1
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local low-privilege account on build server
  2. Delivery
    Monitor or trigger Maven build invoking antlr4-maven-plugin
  3. Exploit
    Identify TOCTOU race window in GrammarDependencies.java ObjectInputStream.readObject()
  4. Execution
    Replace grammar dependency file between check and use operations
  5. Impact
    Achieve 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

ANTLR4 4.13.0
ANTLR4 4.13.1
ANTLR4 4.13.2

Affected Packages

euvd antlr4 no fix

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

Vendor (VulDB) PRIMARY 1.1 LOW
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
vuln.today AI 4.5 MEDIUM

Local-only race condition requiring low privileges and high complexity; limited impact across all three dimensions with no scope change.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
4.0 AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Local
Attack Complexity
High
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jun 28, 2026 - 15:22 NVD
2.0 (LOW) 1.1 (LOW)

DescriptionCVE.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

EPSS Score
0.1%
Top 99% exploitable
Prevalence
Medium
widely used Java parser generator in developer tooling ecosystems
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +6
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy