Skip to main content

ANTLR4 CVE-2026-13503

| EUVDEUVD-2026-40001 MEDIUM
Path Traversal (CWE-22)
2026-06-28 VulDB GHSA-w346-wxvq-p3xr
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

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

  1. Access
    Craft grammar file with tokenVocab traversal payload
  2. Delivery
    Submit or inject grammar into target build pipeline
  3. Exploit
    ANTLR4 tool invoked on malicious grammar
  4. Execution
    getImportedVocabFile resolves traversal path
  5. Persist
    Sensitive file contents read from host filesystem
  6. Impact
    Data 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.5% exploitation probability (EPSS)

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

Alert me

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

ANTLR4 4.13.1
ANTLR4 4.13.2
ANTLR4 4.13.0

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

Vendor (VulDB) PRIMARY 5.5 MEDIUM
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
vuln.today AI 5.3 MEDIUM

Network-reachable build tool processing untrusted grammar files; no authentication or interaction required; impact limited to low-confidentiality file read only.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

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

Lifecycle Timeline

1
CVSS changed
Jun 28, 2026 - 16:22 NVD
6.9 (MEDIUM) 5.5 (MEDIUM)

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

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Medium
popular Java parser generator used across dev toolchains and IDEs
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor 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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +28
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor 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

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