/

CVE-2026-85674

Severity:

HIGH RISK

(7.8)

Code Injection (CWE-94) in aider Repository Loading

CVE-2026-85674

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

aider automatically loads a repository-level .aider.conf.yml file and can execute configured test or lint commands through a shell without confirmation. A user who launches aider from a crafted repository may therefore allow arbitrary commands to run on their local machine, even without an API key or LLM interaction.

Affected context

The issue occurs when aider is launched from a Git repository containing an attacker-controlled .aider.conf.yml file. Risk depends on whether the configuration is automatically discovered and whether configured test-cmd or lint-cmd values are executed through a shell during startup or after a file edit. Users who clone or otherwise open untrusted repositories and run aider in them are most exposed.

Exploit preconditions

  • Attack surface: Repository-local configuration loading and command execution
  • Required access: Ability to supply or modify the repository contents
  • Trigger point: aider startup for test-cmd, or the first file edit for lint-cmd
  • User interaction: No additional confirmation, LLM request, or API key is required after aider is launched in the repository
  • Why exploitation is possible: Configuration values are treated as shell commands and executed with shell interpretation

Why this happens

The underlying flaw is a trust-boundary failure in repository configuration handling. aider automatically accepts command-bearing configuration values from a potentially untrusted repository and passes them to a shell, allowing configuration data to become executable behavior. This maps to CWE-94: Improper Control of Generation of Code, because attacker-controlled input influences the generation or execution of commands.

Potential impact

  • Arbitrary commands could execute with the privileges of the aider process
  • Local files, credentials, or source code may be accessed or modified
  • Developer environments could be altered or compromised
  • Malware or persistence mechanisms could be installed
  • Connected development, build, or deployment systems may be exposed

General mitigation guidance

Mitigation generally focuses on reducing trust in repository-local configuration and avoiding implicit shell execution.

Common defensive patterns include:

  • Treating configuration files from untrusted repositories as untrusted input
  • Requiring explicit user consent before executing configured commands
  • Disabling automatic execution of repository-defined hooks by default
  • Using narrowly defined executable and argument representations instead of shell command strings
  • Avoiding shell interpretation where it is not required
  • Running repository automation with least-privilege accounts and isolated environments
  • Separating editing functionality from command execution and applying clear trust-boundary checks

How teams detect issues like this

Organizations can look for:

  • Static analysis rules identifying shell=True or equivalent shell-spawning APIs
  • Code review signals where repository configuration values flow into subprocess execution
  • Tests that launch tools from repositories containing unexpected command-bearing configuration
  • Policy checks requiring confirmation for commands sourced from project files
  • Endpoint monitoring for child processes spawned by developer tools during startup or file-edit events
  • Automated security review tools that trace untrusted configuration data into command execution

Sources

SourceLink
github.comgithub.com/Aider-AI/aider
github.comgithub.com/Aider-AI/aider/blob/v0.86.2/aider/main.py
github.comgithub.com/Aider-AI/aider/issues/5254
vulncheck.comvulncheck.com/advisories/aider-0.86.2-remote-code-execution-via-aider-conf-yml

Frequently asked

questions

The attack is generally delivered through a crafted repository rather than a network request. A user must clone, obtain, or open the repository and launch aider from its directory.

No. The described command execution occurs without an API key, LLM interaction, or separate authentication step. Local access to run aider in the affected repository is the key prerequisite.

Do not execute repository-defined commands implicitly. Use explicit consent, avoid shell interpretation, and restrict command execution to trusted and narrowly defined operations.

Treat project configuration as untrusted, review subprocess data flows during code review, enforce secure defaults for hooks and commands, and use least-privilege isolation for developer automation.

Find out what's already
exploitable in your codebase.