CVE-2023-46248 (GCVE-0-2023-46248)
Vulnerability from cvelistv5
Published
2023-10-31 15:11
Modified
2024-09-05 17:34
Severity ?
CWE
  • CWE-15 - External Control of System or Configuration Setting
Summary
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.
Impacted products
Vendor Product Version
sourcegraph cody Version: >= 0.10.0, < 0.14.1
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T20:37:40.170Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "name": "https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq",
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq"
          },
          {
            "name": "https://github.com/sourcegraph/cody/pull/1414",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/sourcegraph/cody/pull/1414"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-46248",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-05T17:33:25.503194Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-05T17:34:41.209Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "cody",
          "vendor": "sourcegraph",
          "versions": [
            {
              "status": "affected",
              "version": "\u003e= 0.10.0, \u003c 0.14.1"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "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\u0027s 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\u0027t promptly upgrade, they should not open any untrusted repositories with the Cody extension loaded."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 9.1,
            "baseSeverity": "CRITICAL",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "LOW",
            "scope": "CHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-15",
              "description": "CWE-15: External Control of System or Configuration Setting",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2023-10-31T15:11:46.707Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq"
        },
        {
          "name": "https://github.com/sourcegraph/cody/pull/1414",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/sourcegraph/cody/pull/1414"
        }
      ],
      "source": {
        "advisory": "GHSA-8wmq-fwv7-xmwq",
        "discovery": "UNKNOWN"
      },
      "title": "Overwrite of builtin Cody commands facilitates RCE"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2023-46248",
    "datePublished": "2023-10-31T15:11:46.707Z",
    "dateReserved": "2023-10-19T20:34:00.948Z",
    "dateUpdated": "2024-09-05T17:34:41.209Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-46248\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2023-10-31T16:15:09.777\",\"lastModified\":\"2024-11-21T08:28:09.850\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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\u0027s 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\u0027t promptly upgrade, they should not open any untrusted repositories with the Cody extension loaded.\"},{\"lang\":\"es\",\"value\":\"Cody es un asistente de codificaci\u00f3n de inteligencia artificial (IA). Las versiones de la extensi\u00f3n Cody AI VSCode 0.10.0 a 0.14.0 son vulnerables a la ejecuci\u00f3n remota de c\u00f3digo bajo ciertas condiciones. Un atacante que tenga el control de un repositorio malicioso podr\u00eda modificar el archivo de configuraci\u00f3n de Cody `.vscode/cody.json` y sobrescribir los comandos de Cody. Si un usuario con la extensi\u00f3n instalada abre este repositorio malicioso y ejecuta un comando Cody como /explain o /doc, esto podr\u00eda permitir la ejecuci\u00f3n de c\u00f3digo arbitrario en la m\u00e1quina del usuario. La vulnerabilidad est\u00e1 clasificada como de gravedad cr\u00edtica, 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\u00f3n del c\u00f3digo en un repositorio a trav\u00e9s de VS Code Workspace Trust. El problema se encontr\u00f3 durante una prueba de penetraci\u00f3n habitual de terceros. Los mantenedores de Cody no tienen evidencia de que los repositorios de c\u00f3digo abierto tengan archivos maliciosos `.vscode/cody.json` para explotar esta vulnerabilidad. El problema se solucion\u00f3 en la versi\u00f3n 0.14.1 de la extensi\u00f3n Cody VSCode. En caso de que los usuarios no puedan actualizar r\u00e1pidamente, no deben abrir ning\u00fan repositorio que no sea de confianza con la extensi\u00f3n Cody cargada.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H\",\"baseScore\":9.0,\"baseSeverity\":\"CRITICAL\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"REQUIRED\",\"scope\":\"CHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":2.3,\"impactScore\":6.0},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":8.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":2.8,\"impactScore\":5.9}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-15\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:sourcegraph:cody:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"0.10.0\",\"versionEndIncluding\":\"0.14.0\",\"matchCriteriaId\":\"D70F86B8-E8B8-4C28-9AFF-688A3CD4EF34\"}]}]}],\"references\":[{\"url\":\"https://github.com/sourcegraph/cody/pull/1414\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Exploit\"]},{\"url\":\"https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Vendor Advisory\"]},{\"url\":\"https://github.com/sourcegraph/cody/pull/1414\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Exploit\"]},{\"url\":\"https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Vendor Advisory\"]}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq\", \"name\": \"https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq\", \"tags\": [\"x_refsource_CONFIRM\", \"x_transferred\"]}, {\"url\": \"https://github.com/sourcegraph/cody/pull/1414\", \"name\": \"https://github.com/sourcegraph/cody/pull/1414\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T20:37:40.170Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2023-46248\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-05T17:33:25.503194Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-05T17:34:33.132Z\"}}], \"cna\": {\"title\": \"Overwrite of builtin Cody commands facilitates RCE\", \"source\": {\"advisory\": \"GHSA-8wmq-fwv7-xmwq\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"CHANGED\", \"version\": \"3.1\", \"baseScore\": 9.1, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"CRITICAL\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"REQUIRED\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"HIGH\"}}], \"affected\": [{\"vendor\": \"sourcegraph\", \"product\": \"cody\", \"versions\": [{\"status\": \"affected\", \"version\": \"\u003e= 0.10.0, \u003c 0.14.1\"}]}], \"references\": [{\"url\": \"https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq\", \"name\": \"https://github.com/sourcegraph/cody/security/advisories/GHSA-8wmq-fwv7-xmwq\", \"tags\": [\"x_refsource_CONFIRM\"]}, {\"url\": \"https://github.com/sourcegraph/cody/pull/1414\", \"name\": \"https://github.com/sourcegraph/cody/pull/1414\", \"tags\": [\"x_refsource_MISC\"]}], \"descriptions\": [{\"lang\": \"en\", \"value\": \"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\u0027s 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\u0027t promptly upgrade, they should not open any untrusted repositories with the Cody extension loaded.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-15\", \"description\": \"CWE-15: External Control of System or Configuration Setting\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2023-10-31T15:11:46.707Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2023-46248\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-09-05T17:34:41.209Z\", \"dateReserved\": \"2023-10-19T20:34:00.948Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2023-10-31T15:11:46.707Z\", \"assignerShortName\": \"GitHub_M\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…