/

CVE-2026-115726

Severity:

HIGH RISK

(7.8)

OS Command Injection (CWE-78) in Aider Configuration

CVE-2026-115726

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

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 through version 0.86.2 can execute attacker-controlled shell commands from a malicious .aider.conf.yml file that is automatically loaded without a trust prompt. If a victim opens a project containing this configuration, commands configured through notification or editor settings may run with the victim's privileges after model responses or editor actions.

Aider through version 0.86.2 can execute attacker-controlled shell commands from a malicious .aider.conf.yml file that is automatically loaded without a trust prompt. If a victim opens a project containing this configuration, commands configured through notification or editor settings may run with the victim's privileges after model responses or editor actions.

Affected context

The vulnerability occurs when Aider automatically loads project-level .aider.conf.yml configuration without clearly establishing that the file is trusted. Risk is present when configuration values such as notifications-command or editor settings are later passed to process execution using shell interpretation. The impact depends on whether a victim opens or operates on an untrusted project and what privileges are available to the Aider process.

The vulnerability occurs when Aider automatically loads project-level .aider.conf.yml configuration without clearly establishing that the file is trusted. Risk is present when configuration values such as notifications-command or editor settings are later passed to process execution using shell interpretation. The impact depends on whether a victim opens or operates on an untrusted project and what privileges are available to the Aider process.

Exploit preconditions

  • Attack surface: Project-level Aider configuration files and settings that invoke external commands
  • Required access: Ability to place or modify a malicious .aider.conf.yml in a project the victim will use
  • Trigger point: Aider startup followed by a model reply or use of the /editor command, depending on the configured setting
  • Why exploitation is possible: Configuration values are treated as executable shell commands and passed to subprocess execution with shell interpretation enabled
  • Attack surface: Project-level Aider configuration files and settings that invoke external commands
  • Required access: Ability to place or modify a malicious .aider.conf.yml in a project the victim will use
  • Trigger point: Aider startup followed by a model reply or use of the /editor command, depending on the configured setting
  • Why exploitation is possible: Configuration values are treated as executable shell commands and passed to subprocess execution with shell interpretation enabled

Why this happens

The underlying bug is OS command injection caused by treating configuration-controlled strings as shell commands. Aider automatically loads attacker-influenced configuration and uses subprocess execution with shell=True, allowing shell metacharacters and command expressions in trusted-looking settings to affect process behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because untrusted input reaches an operating-system command interpreter without adequate separation or validation.

The underlying bug is OS command injection caused by treating configuration-controlled strings as shell commands. Aider automatically loads attacker-influenced configuration and uses subprocess execution with shell=True, allowing shell metacharacters and command expressions in trusted-looking settings to affect process behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because untrusted input reaches an operating-system command interpreter without adequate separation or validation.

Potential impact

  • Arbitrary commands may execute with the victim's operating-system privileges
  • Local files, credentials, source code, or environment variables could be accessed
  • Project data could be modified, deleted, or exfiltrated
  • Malware or persistence mechanisms could be installed
  • Development workflows and software supply chains could be compromised
  • Arbitrary commands may execute with the victim's operating-system privileges
  • Local files, credentials, source code, or environment variables could be accessed
  • Project data could be modified, deleted, or exfiltrated
  • Malware or persistence mechanisms could be installed
  • Development workflows and software supply chains could be compromised

General mitigation guidance

Mitigation generally focuses on treating project configuration as untrusted data rather than executable policy.

Common defensive patterns include:

  • Require explicit user consent before loading project-provided command or editor settings
  • Avoid shell interpretation for externally influenced values
  • Invoke programs using argument arrays and restricted executable allowlists
  • Separate notification and editor selection from arbitrary command strings
  • Validate configuration against a strict schema and reject unexpected command-bearing fields
  • Run development tools with least-privilege accounts, limited filesystem access, and constrained environment variables
  • Reduce trust in repository-controlled configuration through documented project-boundary policies

Mitigation generally focuses on treating project configuration as untrusted data rather than executable policy.

Common defensive patterns include:

  • Require explicit user consent before loading project-provided command or editor settings
  • Avoid shell interpretation for externally influenced values
  • Invoke programs using argument arrays and restricted executable allowlists
  • Separate notification and editor selection from arbitrary command strings
  • Validate configuration against a strict schema and reject unexpected command-bearing fields
  • Run development tools with least-privilege accounts, limited filesystem access, and constrained environment variables
  • Reduce trust in repository-controlled configuration through documented project-boundary policies

How teams detect issues like this

Detection can combine source analysis, configuration scanning, and runtime monitoring:

  • Search code for shell=True, shell invocation APIs, and subprocess calls that incorporate configuration values
  • Flag automatic loading of repository-controlled configuration without trust prompts or provenance checks
  • Review notification, editor, hook, and callback settings for command execution behavior
  • Scan repositories for .aider.conf.yml files containing command-bearing options or suspicious shell syntax
  • Enforce policies that prohibit arbitrary command strings in project configuration
  • Monitor process creation by Aider and alert on unexpected child processes or access to sensitive files
  • Automated code-review and static-analysis tools can help identify unsafe command construction patterns

Detection can combine source analysis, configuration scanning, and runtime monitoring:

  • Search code for shell=True, shell invocation APIs, and subprocess calls that incorporate configuration values
  • Flag automatic loading of repository-controlled configuration without trust prompts or provenance checks
  • Review notification, editor, hook, and callback settings for command execution behavior
  • Scan repositories for .aider.conf.yml files containing command-bearing options or suspicious shell syntax
  • Enforce policies that prohibit arbitrary command strings in project configuration
  • Monitor process creation by Aider and alert on unexpected child processes or access to sensitive files
  • Automated code-review and static-analysis tools can help identify unsafe command construction patterns

Sources

SourceLink
github.comgithub.com/Aider-AI/aider/blob/v0.86.2/aider/editor.py#L89-L134
github.comgithub.com/Aider-AI/aider/blob/v0.86.2/aider/io.py#L1088-L1094
github.comgithub.com/Aider-AI/aider/blob/v0.86.2/aider/main.py#L464-L479
github.comgithub.com/Aider-AI/aider/issues/5885
vulncheck.comvulncheck.com/advisories/aider-through-0.86.2-command-execution-via-repository-aider-conf-yml-settings

Frequently asked

questions

It is primarily a local or project-mediated attack. An attacker generally needs to place a malicious configuration file in a project that a victim will open or use, although the file could be delivered through source repositories or other shared project mechanisms.

The attacker needs the ability to influence a project-level .aider.conf.yml file or another configuration source that Aider automatically loads. The victim must then trigger the relevant Aider behavior.

Treat repository-controlled configuration as untrusted, require explicit consent for executable settings, and avoid passing configuration strings through a shell. Use fixed executable allowlists and argument-based process invocation instead.

Apply least privilege, review command-bearing configuration fields, enforce repository trust policies, scan for unsafe subprocess usage, and monitor unexpected child-process creation by development tools.

It is primarily a local or project-mediated attack. An attacker generally needs to place a malicious configuration file in a project that a victim will open or use, although the file could be delivered through source repositories or other shared project mechanisms.

The attacker needs the ability to influence a project-level .aider.conf.yml file or another configuration source that Aider automatically loads. The victim must then trigger the relevant Aider behavior.

Treat repository-controlled configuration as untrusted, require explicit consent for executable settings, and avoid passing configuration strings through a shell. Use fixed executable allowlists and argument-based process invocation instead.

Apply least privilege, review command-bearing configuration fields, enforce repository trust policies, scan for unsafe subprocess usage, and monitor unexpected child-process creation by development tools.

Find out what's already
exploitable in your codebase.