# CVE-2026-57586: CodeRAG: Gradle Wrapper Execution During Dependency Discovery Enables Arbitrary Code Execution

- Severity: High 8.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2026-06-19T15:01:06.000Z
- Modified: 2026-09-30T17:51:56.193Z
- Also known as: GHSA-wg5p-8h9p-3mr7
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- naranor agent-coderag: < 1.3.1
- agent-coderag (PyPI): before 1.3.1

## Every score

- GitHub_M: CVSS:3.1 8.6 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.6 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`

## References

- <https://github.com/naranor/agent-coderag/security/advisories/GHSA-wg5p-8h9p-3mr7> (web)
- <https://github.com/naranor/agent-coderag/commit/1d917513cd95209bab9cbb5fe00df84989805e7d>
- <https://github.com/naranor/agent-coderag/releases/tag/v1.3.1>
- <https://github.com/naranor/agent-coderag> (package)

## Sources

- CVE List: [CVE-2026-57586](https://www.cve.org/CVERecord?id=CVE-2026-57586), CVE Terms of Use, modified 2026-09-15
- GitHub Advisory Database: [GHSA-wg5p-8h9p-3mr7](https://github.com/advisories/GHSA-wg5p-8h9p-3mr7), CC-BY-4.0, modified 2026-09-16
- NVD: [CVE-2026-57586](https://nvd.nist.gov/vuln/detail/CVE-2026-57586), Public domain, modified 2026-09-30

---

Page: https://cve.day/CVE-2026-57586 · Whole record: https://cve.day/CVE-2026-57586.json · Rebuilt by cve.day 2026-11-25T22:59:38.544Z
