Kilo-Org Kilocode Environment Variable Handler Information Disclosure Vulnerability

Vulnerability

An information disclosure vulnerability has been identified in Kilo-Org Kilocode versions through 7.0.47. The issue arises in the Environment Variable Handler, specifically within the Load function of the config.ts file in the opencode package. The vulnerability allows for arbitrary file reading by manipulating the KILO_CONFIG_CONTENT environment variable. This flaw can be exploited remotely, leading to the leakage of sensitive information such as API keys, AWS credentials, or SSH private keys.

Impact

Exploitation of this vulnerability allows for arbitrary file reading, with the potential to access highly sensitive information. The leaked data can include environment configuration files, API keys, AWS credentials, or SSH private keys. In CI/CD pipelines, this could lead to significant access escalation.

Reproduction

To reproduce this vulnerability, set the KILO_CONFIG_CONTENT environment variable with a JSON string that includes an invalid key name surrounding the {file:/path} token syntax. Then, run the Kilocode CLI, ensuring that the application logs are printed. The targeted file's content will be read and displayed in the error log, immediately before the application exits.

Added: May 17, 2026, 11:21 PM
Updated: May 17, 2026, 11:21 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
8.7
remediation
0.0
relevance
8.6
threat
6.4
urgency
2.9
incentive
4.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.