CVE-2023-46248

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

Configuration 1 (hide)

cpe:2.3:a:sourcegraph:cody:*:*:*:*:*:*:*:*

History

21 Nov 2024, 08:28

Type Values Removed Values Added
References () https://github.com/sourcegraph/cody/pull/1414 - Exploit () https://github.com/sourcegraph/cody/pull/1414 - Exploit
References () https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq - Vendor Advisory () https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq - Vendor Advisory
CVSS v2 : unknown
v3 : 8.8
v2 : unknown
v3 : 9.0

08 Nov 2023, 17:49

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 8.8
CPE cpe:2.3:a:sourcegraph:cody:*:*:*:*:*:*:*:*
First Time Sourcegraph
Sourcegraph cody
References (MISC) https://github.com/sourcegraph/cody/pull/1414 - (MISC) https://github.com/sourcegraph/cody/pull/1414 - Exploit
References (MISC) https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq - (MISC) https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq - Vendor Advisory

31 Oct 2023, 17:07

Type Values Removed Values Added
New CVE

Information

Published : 2023-10-31 16:15

Updated : 2024-11-21 08:28


NVD link : CVE-2023-46248

Mitre link : CVE-2023-46248

CVE.ORG link : CVE-2023-46248


JSON object : View

Products Affected

sourcegraph

  • cody
CWE
CWE-15

External Control of System or Configuration Setting