Description
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.
Published: 2026-06-28
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in the OutputFile.java file within the ANTLR4 Grammar Action Block Handler and is present in all versions up to and including 4.13.2. An attacker can supply crafted input that causes the parser to execute arbitrary code, leading to a remote code execution scenario. The weakness maps to CWE‑74, involving untrusted paths or resources, and CWE‑94, involving improper handling of input to a compiler or interpreter.

Affected Systems

All users of ANTLR4 whose deployments include the Grammar Action Block Handler function are affected. Specifically, ANTLR4 versions 4.13.2 and earlier are vulnerable; newer releases beyond 4.13.2 have not been identified as affected in this advisory.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate severity, and the EPSS score is not available, but the exploit is publicly released and can be invoked remotely. Because the vulnerability is publicly known and no vendor response has been received, the risk remains significant. The attack likely requires only a malicious grammar definition submitted to the parser, making exploitation straightforward for an attacker who can influence grammar construction.

Generated by OpenCVE AI on June 28, 2026 at 15:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Check the ANTLR website for an updated release that addresses this vulnerability and upgrade if possible.
  • If an upgrade is not feasible, restrict the grammar files that the parser processes and validate or sanitize all input received by the grammar parser to prevent execution of injected code.
  • Enforce an environment policy that limits file system paths used by the parser to a secure directory, thereby reducing the impact of any code injection.

Generated by OpenCVE AI on June 28, 2026 at 15:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 02 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Mon, 29 Jun 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sun, 28 Jun 2026 14:30:00 +0000

Type Values Removed Values Added
Description 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.
Title antlr ANTLR4 Grammar Action Block OutputFile.java code injection
First Time appeared Antlr
Antlr antlr4
Weaknesses CWE-74
CWE-94
CPEs cpe:2.3:a:antlr:antlr4:*:*:*:*:*:*:*:*
Vendors & Products Antlr
Antlr antlr4
References
Metrics cvssV2_0

{'score': 7.5, 'vector': 'AV:N/AC:L/Au:N/C:P/I:P/A:P/E:POC/RL:ND/RC:UR'}

cvssV3_0

{'score': 7.3, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:X/RC:R'}

cvssV4_0

{'score': 6.9, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulDB

Published:

Updated: 2026-06-29T12:37:01.600Z

Reserved: 2026-06-27T18:27:58.576Z

Link: CVE-2026-13500

cve-icon Vulnrichment

Updated: 2026-06-29T12:36:56.748Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-06-28T14:15:07Z

Links: CVE-2026-13500 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-06-29T20:05:46Z

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')