CVE-2026-13500

antlr ANTLR4 Grammar Action Block OutputFile.java code injection

Published Jun 28, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

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

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
Metrics ssvc

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

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

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

Sources

Status
PUBLISHED
Assigner
VulDB
Published
Updated
Jun 29, 2026, 12:37 PM
Reserved
Jun 27, 2026, 6:27 PM
Status
Deferred
Published
Jun 28, 2026, 3:16 PM
Modified
Oct 25, 2026, 5:10 PM
Severity
Important
Public date
Jun 28, 2026, 2:15 PM