CVE-2026-13501 Details
Description
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.
A command injection vulnerability has been identified in ANTLR4 versions prior to 4.13.2, specifically within the GoTarget class of the Go code generation component. The issue arises because the GoTarget function executes the 'gofmt' command using ProcessBuilder without specifying an absolute path, allowing an attacker to inject a malicious 'gofmt' binary that is executed with the privileges of the build process. This vulnerability can be exploited locally by manipulating the PATH environment variable to include a directory with a crafted 'gofmt' executable.
To address this vulnerability, ANTLR4 should be updated to version 4.13.2 or later. Additionally, when using the GoTarget class, specify the 'gofmt' binary path explicitly or validate its location before execution.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 28, 2026CISA-ADP
Assessed Jun 29, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/wooyun123/wooyun/issues/6 | [email protected] | ExploitIssue TrackingTechnical Analysis |
| https://vuldb.com/cve/CVE-2026-13501 | [email protected] | AdvisoryPermission Required |
| https://vuldb.com/submit/838569 | [email protected] | Issue TrackingPermission Required |
| https://vuldb.com/vuln/374496 | [email protected] | AdvisoryPermission Required |
| https://vuldb.com/vuln/374496/cti | [email protected] | Content Wall |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | [email protected] |
| CWE-77 | Improper Neutralization of Special Elements used in a Command ('Command Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| antlr ANTLR4 | <= 4.13.2 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jun 29, 2026 | CVE Modified | CISA-ADP |
| Jun 28, 2026 | New CVE Received | [email protected] |
Volerion