Skip to main content

ANTLR4 EUVDEUVD-2026-39999

| CVE-2026-13501 LOW
Command Injection (CWE-77)
2026-06-28 VulDB GHSA-q226-w36v-hhxv
1.9
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

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

  1. Access
    Gain local low-privilege system access
  2. Delivery
    Supply or manipulate grammar file with injected shell metacharacters
  3. Exploit
    Invoke ANTLR4 with Go target selected
  4. Execution
    GoTarget.java passes unsanitized input to gofmt OS command
  5. Persist
    Injected commands execute in ANTLR4 process context
  6. Impact
    Read or modify local files within process scope

Vulnerability Assessment

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

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires local access to the machine running ANTLR4 and a low-privilege OS account (PR:L per CVSS 4.0 AV:L/PR:L). The vulnerability is triggered specifically when ANTLR4 is invoked with the Go language target selected, causing GoTarget.java to call gofmt as an external process - users generating output only for non-Go targets are not exposed. The attacker must be able to supply or influence the grammar file or input processed by the GoTarget function; this is the concrete exploitation prerequisite. Remote network exploitation is structurally impossible given AV:L. Exploitation is further limited by the low-impact C/I/A ratings (VC:L/VI:L/VA:L) - no privilege escalation or full system compromise is implied. The non-default condition is use of the Go code generation target specifically, and the attacker needing write or influence over input grammar files.

Impact

The CVSS 4.0 score of 1.9 with vector AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N accurately characterizes this as a low-severity, locally-constrained vulnerability. The local attack vector (AV:L) is the primary risk limiter - no remote exploitation path exists. Low privileges (PR:L) are required, meaning an authenticated local user must be present on the machine running code generation. The E:P modifier in the provided CVSS 4.0 vector confirms a public proof-of-concept exists, which marginally elevates exploitability concern. No EPSS score was provided in the intelligence data; KEV status is absent, confirming no confirmed active exploitation in production environments. The vendor's non-response to disclosure leaves the patch timeline entirely unknown. In practice, risk is meaningful primarily in CI/CD environments where ANTLR4 processes externally-supplied grammar files under low-privilege runner accounts - an attacker with code execution on that runner could leverage this for lateral movement. For standard developer use cases, this is a low-priority finding.

Exploit ScenarioDerived

A low-privilege local user on a developer workstation or CI/CD build agent crafts a grammar file containing shell metacharacters embedded in a path or identifier that ANTLR4's GoTarget.java passes unsanitized to the gofmt process invocation. When a developer or automated pipeline runs ANTLR4 to generate Go source code from this grammar, the injected commands execute within the ANTLR4 process context, potentially reading local credentials or writing files. A public proof-of-concept demonstrating this technique is available at https://github.com/wooyun123/wooyun/issues/6.

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

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

Alert me

AnalysisAIv1 – Jun 28, 2026

Command injection in ANTLR4's Go code generation target (GoTarget.java) allows a local low-privilege attacker to execute arbitrary OS commands via unsanitized input passed to the gofmt invocation, affecting all versions up to 4.13.2. This vulnerability is scoped entirely to local environments such as developer workstations or CI/CD pipelines running ANTLR4 Go target code generation. A publicly available proof-of-concept exploit exists per the GitHub disclosure, but this is not confirmed as actively exploited (not in CISA KEV), and the CVSS 4.0 base score of 1.9 reflects its genuinely constrained real-world impact.

RemediationAI

No vendor-released patch has been identified at time of analysis - the ANTLR4 maintainers did not respond to the coordinated disclosure. Monitor the official ANTLR4 GitHub repository and VulDB entry (https://vuldb.com/cve/CVE-2026-13501) for any upstream fix. As a primary compensating control, restrict the Go target code generation workflow to trusted, controlled grammar files only - do not process externally-supplied or user-controlled grammar files through ANTLR4's Go target until a patch is available, as this eliminates the attacker-controlled input path. In CI/CD environments, sandbox the ANTLR4 tool invocation using Docker containers with dropped capabilities (e.g., --cap-drop=ALL) or seccomp profiles to limit the blast radius of any injected commands - trade-off is added pipeline complexity. Restrict local system access to users who legitimately require ANTLR4 Go target code generation. If Go target generation is not required, avoid invoking the Go target entirely as a defensive measure.

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 is a Java-based parser generator that supports multiple target programming languages. The affected component is the Go language target code generator, specifically the GoTarget function in tool/src/org/antlr/v4/codegen/target/GoTarget.java. This component invokes gofmt - Go's standard source formatter - as an external process during code generation. CWE-77 (Improper Neutralization of Special Elements used in a Command) identifies the root cause: user-controlled input (likely grammar file content or file path metadata) is passed unsanitized into the OS-level command construction that invokes gofmt, enabling shell metacharacter injection. The CPE string cpe:2.3:a:antlr:antlr4:*:*:*:*:*:*:*:* confirms all ANTLR4 releases through 4.13.2 carry this flaw in the Go target path.

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.9 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 5.3 MEDIUM

Local-only attack vector and low-privilege requirement strictly bound reach; limited C/I/A impact reflects constrained gofmt command injection scope with no scope change.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
4.0 AV:L/AC:L/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
Low
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

2
Severity Changed
Jun 28, 2026 - 15:22 NVD
MEDIUM LOW
CVSS changed
Jun 28, 2026 - 15:22 NVD
4.8 (MEDIUM) 1.9 (LOW)

DescriptionCVE.org

A security vulnerability has been detected in antlr ANTLR4 up to 4.13.2. Affected by this vulnerability is the function GoTarget of the file tool/src/org/antlr/v4/codegen/target/GoTarget.java of the component gofmt. The manipulation leads to command injection. The attack can only be performed from a local environment. The exploit has been disclosed publicly 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.7%
Top 52% exploitable
Prevalence
Medium
widely used parser generator across Java and polyglot development toolchains
Exploit
POC
Public exploit code exists
Social Media
2
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.7%
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

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

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

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