Skip to main content

ANTLR4 CVE-2026-13500

| EUVDEUVD-2026-39998 MEDIUM
Code Injection (CWE-94)
2026-06-28 VulDB GHSA-m64j-m5c8-f58p
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 malicious grammar with injected action block
  2. Delivery
    Introduce grammar via supply chain or repo compromise
  3. Exploit
    CI/CD pipeline invokes ANTLR4 tool
  4. Execution
    OutputFile.java processes action block unsanitized
  5. Persist
    Arbitrary code executes in build environment
  6. Impact
    Attacker achieves RCE on developer machine or CI runner

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

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 the target system run ANTLR4 version 4.13.2 or earlier against a grammar file (.g4) containing a maliciously crafted action block in the Grammar Action Block Handler. The attacker must control or influence the grammar file content - either directly (supply chain injection, repository compromise, malicious open-source contribution) or indirectly (social engineering a developer into processing a shared grammar). The CVSS 4.0 vector includes UI:N, suggesting the tool processes the grammar without explicit per-block user confirmation, which is consistent with automated build pipeline operation. Exploitation is limited to environments where ANTLR4 is actually invoked as a build or code-generation tool; runtime deployments of ANTLR4-generated parsers that do not invoke the ANTLR4 generator itself are not directly affected. No authentication to the target system is required by the attacker - the prerequisite is delivery of a malicious grammar file, not credential access.

Impact

The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/E:P) scores 6.9, but the low impact metrics (L/L/L) appear inconsistent with the RCE and Code Injection tags assigned to this vulnerability. Code injection during parser generation typically results in full compromise of the host, not partial impact, suggesting the CVSS impact metrics may be understated. No EPSS score was provided, and the vulnerability is not listed in the CISA KEV catalog, so widespread automated exploitation has not been confirmed. However, a public POC exists on GitHub, which meaningfully elevates the practical threat above zero. The real-world risk is amplified by ANTLR4's common use in CI/CD pipelines: a malicious grammar file introduced via a supply-chain vector (e.g., a dependency's grammar file in a shared build system) could yield RCE on build infrastructure without interactive user awareness. The lack of any vendor response further elevates risk since no official patch timeline exists. Priority should be elevated for teams processing untrusted or third-party grammar files.

Exploit ScenarioDerived

An attacker contributes or compromises a repository containing an ANTLR4 grammar file and embeds a malicious action block within it. When a developer or automated CI/CD pipeline runs the ANTLR4 tool to regenerate parsers, OutputFile.java processes the grammar action block without adequate sanitization, causing the injected code to execute in the context of the build process. A public POC on GitHub (https://github.com/wooyun123/wooyun/issues/4) demonstrates the technique, lowering the barrier for exploitation.

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

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

Alert me

AnalysisAIv1 – Jun 28, 2026

Code injection in ANTLR4's Grammar Action Block Handler allows remote attackers to execute arbitrary code by supplying a crafted grammar file processed by the tool. All versions up to and including 4.13.2 are affected via the OutputFile.java code generation pathway. A public proof-of-concept exploit exists on GitHub (no KEV listing), though the vendor has not acknowledged or patched the issue, leaving users without an official fix.

RemediationAI

No vendor-released patch has been identified at time of analysis, and the vendor did not respond to the coordinated disclosure. Until a patch is available, organizations should avoid processing untrusted or externally-sourced ANTLR4 grammar files (.g4) through any ANTLR4 toolchain at or below version 4.13.2. Specific compensating controls include: restricting ANTLR4 execution to isolated CI/CD sandbox environments with no network egress, so that any injected code cannot beacon out; enforcing cryptographic integrity checks (e.g., checksums or signed commits) on all grammar files before they enter the build pipeline to detect unauthorized modifications; and pinning grammar file sources to trusted internal repositories rather than pulling from public registries. Note that sandbox isolation does not prevent code injection into generated parser output files, which may then be compiled and executed downstream - downstream build steps should also be reviewed. Monitor the VulDB tracking page at https://vuldb.com/vuln/374495 and the ANTLR4 GitHub releases for an official patch release.

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 that compiles grammar files (.g4) into lexers and parsers. Grammar action blocks are Java code snippets embedded directly in grammar files; ANTLR4 processes these blocks via OutputFile.java during the code generation phase and interpolates them into generated source files. CWE-94 (Improper Control of Generation of Code / Code Injection) covers scenarios where user-controlled input - here, a grammar action block - is incorporated into generated code or interpreted in a privileged context without sufficient sanitization. The CPE (cpe:2.3:a:antlr:antlr4:*:*:*:*:*:*:*:*) confirms the entire ANTLR4 product family up to 4.13.2 is in scope. Because ANTLR4 typically runs in developer or CI/CD environments with elevated local privileges, successful exploitation yields code execution in a highly sensitive context.

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:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 9.6 CRITICAL

UI:R because a developer or pipeline must actively process the malicious grammar file; S:C and C:H/I:H/A:H reflect full code execution on the host.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 7.3 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Red Hat 7.3 HIGH

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
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
6.9 (MEDIUM) 5.5 (MEDIUM)

DescriptionCVE.org

A weakness has been identified in antlr ANTLR4 up to 4.13.2. Affected is an unknown function of the file tool/src/org/antlr/v4/codegen/model/OutputFile.java of the component Grammar Action Block Handler. Executing a manipulation can lead to code injection. The attack may be launched remotely. The exploit has been made available to the public and could be used for attacks. The vendor was contacted early about this disclosure but did not respond in any way.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
Medium
widely used Java parser generator in developer and enterprise build toolchains
Exploit
POC
Public exploit code exists
Social Media
1
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.3%
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

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

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Vendor StatusVendor

SUSE

Severity: Important
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