CVE-2026-13501

Description

A flaw was found in antlr ANTLR4. This vulnerability allows a local attacker to execute arbitrary commands by manipulating the GoTarget function within the gofmt component. This command injection can lead to unauthorized actions on the system where the affected software is running.

Statement

This flaw is a command injection in the GoTarget code-generation class (tool/src/org/antlr/v4/codegen/target/GoTarget.java) of the ANTLR4 tool, triggered when ANTLR4 generates a Go-language parser and invokes gofmt. The vulnerable code exists only in the ANTLR4 (4.x) generator tool.

Red Hat products do not ship the affected ANTLR4 Go-target generator. The antlr packages in Red Hat Enterprise Linux are ANTLR 2.7.7, and antlr3 is ANTLR 3.5.3 — neither major version contains a Go code-generation target or the GoTarget class. The only ANTLR4 present is the antlr4 4.8.0 JavaScript runtime bundled in Grafana, which is the parser runtime library, not the code-generation tool. The Go toolchain (gofmt) is not itself vulnerable; it is merely invoked by the ANTLR4 generator. Consequently, no Red Hat product is affected by this flaw.

Mitigation

No mitigation is required. Red Hat products are not affected by this vulnerability.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.3N/A5.3
Attack VectorLocalN/ALocal
Attack ComplexityLowN/ALow
Privileges RequiredLowN/ALow
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityLowN/ALow
Integrity ImpactLowN/ALow
Availability ImpactLowN/ALow

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

cve.org: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L/E:P/RC:R

Understanding the Weakness (CWE)

Confidentiality,Integrity,Availability,Non-Repudiation

Technical Impact: Execute Unauthorized Code or Commands; DoS: Crash, Exit, or Restart; Read Files or Directories; Modify Files or Directories; Read Application Data; Modify Application Data; Hide Activities

Attackers could execute unauthorized operating system commands, which could then be used to disable the product, or read and modify data for which the attacker does not have permissions to access directly. Since the targeted application is directly executing the commands instead of the attacker, any malicious activities may appear to come from the application or the application's owner.

Frequently Asked Questions

Want to get errata notifications? Sign up here.