CVE-2023-46248
Overwrite of builtin Cody commands facilitates RCE
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
Cody is an artificial intelligence (AI) coding assistant. The Cody AI VSCode extension versions 0.10.0 through 0.14.0 are vulnerable to Remote Code Execution under certain conditions. An attacker in control of a malicious repository could modify the Cody configuration file `.vscode/cody.json` and overwrite Cody commands. If a user with the extension installed opens this malicious repository and runs a Cody command such as /explain or /doc, this could allow arbitrary code execution on the user's machine. The vulnerability is rated as critical severity, but with low exploitability. It requires the user to have a malicious repository loaded and execute the overwritten command in VS Code. The issue is exploitable regardless of the user blocking code execution on a repository through VS Code Workspace Trust. The issue was found during a regular 3rd party penetration test. The maintainers of Cody do not have evidence of open source repositories having malicious `.vscode/cody.json` files to exploit this vulnerability. The issue is fixed in version 0.14.1 of the Cody VSCode extension. In case users can't promptly upgrade, they should not open any untrusted repositories with the Cody extension loaded.
Cody es un asistente de codificación de inteligencia artificial (IA). Las versiones de la extensión Cody AI VSCode 0.10.0 a 0.14.0 son vulnerables a la ejecución remota de código bajo ciertas condiciones. Un atacante que tenga el control de un repositorio malicioso podría modificar el archivo de configuración de Cody `.vscode/cody.json` y sobrescribir los comandos de Cody. Si un usuario con la extensión instalada abre este repositorio malicioso y ejecuta un comando Cody como /explain o /doc, esto podría permitir la ejecución de código arbitrario en la máquina del usuario. La vulnerabilidad está clasificada como de gravedad crítica, pero con baja explotabilidad. Requiere que el usuario tenga cargado un repositorio malicioso y ejecute el comando sobrescrito en VS Code. El problema se puede explotar independientemente de que el usuario bloquee la ejecución del código en un repositorio a través de VS Code Workspace Trust. El problema se encontró durante una prueba de penetración habitual de terceros. Los mantenedores de Cody no tienen evidencia de que los repositorios de código abierto tengan archivos maliciosos `.vscode/cody.json` para explotar esta vulnerabilidad. El problema se solucionó en la versión 0.14.1 de la extensión Cody VSCode. En caso de que los usuarios no puedan actualizar rápidamente, no deben abrir ningún repositorio que no sea de confianza con la extensión Cody cargada.
CVSS Scores
SSVC
- Decision:Track*
Timeline
- 2023-10-19 CVE Reserved
- 2023-10-31 CVE Published
- 2024-09-05 CVE Updated
- 2024-09-05 First Exploit
- 2024-12-17 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-15: External Control of System or Configuration Setting
CAPEC
References (2)
URL | Tag | Source |
---|
URL | Date | SRC |
---|---|---|
https://github.com/sourcegraph/cody/pull/1414 | 2024-09-05 |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq | 2023-11-08 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Sourcegraph Search vendor "Sourcegraph" | Cody Search vendor "Sourcegraph" for product "Cody" | >= 0.10.0 <= 0.14.0 Search vendor "Sourcegraph" for product "Cody" and version " >= 0.10.0 <= 0.14.0" | - |
Affected
|