CVE-2026-57586
Received Received - Intake

Code Execution in CodeRAG via Untrusted Gradle Repository

Vulnerability report for CVE-2026-57586, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-15

Last updated on: 2026-09-15

Assigner: GitHub, Inc.

Description

CodeRAG is a lightweight semantic code search and distillation utility for AI coding agents. Prior to 1.3.1, the default agent-coderag sync flow in code_rag/entry/cli.py calls sync_dependencies for an indexed path, and code_rag/core/manager.py treats build.gradle or build.gradle.kts as sufficient to invoke _sync_gradle. _sync_gradle prefers a repository-controlled gradlew or gradlew.bat file and passes it directly to asyncio.create_subprocess_exec with the repository root as the working directory; validate_path in code_rag/core/utils.py constrains the directory location but does not validate the executable's content or integrity. A victim who indexes an attacker-controlled Gradle repository therefore executes attacker-supplied code with the victim's operating-system privileges, allowing disclosure, modification, persistence, or denial of service in the user environment. This issue is fixed in 1.3.1.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-15
Last Modified
2026-09-15
Generated
2026-09-15
AI Q&A
2026-09-15
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
coderag coderag to 1.3.1 (exc)
naranor agent-coderag to 1.3.1 (exc)
naranor agent-coderag 1.3.1

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-78 The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-57586 is a Remote Code Execution (RCE) vulnerability in CodeRAG, a tool for AI coding agents. It occurs when the tool unconditionally executes a repository-controlled Gradle Wrapper script (gradlew) during dependency discovery. Attackers can exploit this by creating a malicious Gradle repository with a crafted build.gradle file and a malicious gradlew script. When a victim runs agent-coderag sync on this repository, the tool executes the attacker's script without validation, allowing arbitrary code execution with the victim's OS privileges.

The vulnerability arises because the tool prioritizes local wrapper scripts over system-installed Gradle binaries and lacks integrity checks. This flaw enables attackers to run malicious code, potentially leading to data disclosure, modification, persistence, or denial of service.

Detection Guidance

Check if agent-coderag version is below 1.3.1 by running: pip show agent-coderag. If installed, verify if Gradle wrapper scripts (gradlew or gradlew.bat) are present in indexed repositories. Monitor for unexpected Gradle process executions during dependency sync.

Impact Analysis

If you use CodeRAG versions 1.3.0 or earlier, an attacker could trick you into indexing a malicious Gradle repository. This would allow them to execute arbitrary code on your system with your privileges. The impact includes potential data theft, system compromise, or disruption of services. The attack requires no authentication and is triggered by default behavior, making it particularly dangerous for untrusted repositories or CI/CD pipelines.

Compliance Impact

This vulnerability could lead to unauthorized code execution, potentially violating GDPR's data protection requirements or HIPAA's security rules for protected health information. A successful exploit may result in data breaches, unauthorized modifications, or service disruptions, all of which could lead to non-compliance with these regulations. The high severity of the flaw (CVSS 8.6) underscores the risk of significant compliance violations.

Mitigation Strategies

Upgrade agent-coderag to version 1.3.1 or later immediately. Avoid indexing untrusted repositories. If using older versions, disable automatic Gradle wrapper execution by ensuring system Gradle is used exclusively.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-57586. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart