CVE-2026-33718 (GCVE-0-2026-33718)

Vulnerability from cvelistv5 – Published: 2026-03-27 00:12 – Updated: 2026-03-27 20:04
VLAI?
Title
OpenHands is Vulnerable to Command Injection through its Git Diff Handler
Summary
OpenHands is software for AI-driven development. Starting in version 1.5.0, a Command Injection vulnerability exists in the `get_git_diff()` method at `openhands/runtime/utils/git_handler.py:134`. The `path` parameter from the `/api/conversations/{conversation_id}/git/diff` API endpoint is passed unsanitized to a shell command, allowing authenticated attackers to execute arbitrary commands in the agent sandbox. The user is already allowed to instruct the agent to execute commands, but this bypasses the normal channels. Version 1.5.0 fixes the issue.
CWE
  • CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Assigner
Impacted products
Vendor Product Version
OpenHands OpenHands Affected: < 1.5.0
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-33718",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-03-27T20:04:41.208442Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-03-27T20:04:54.607Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "OpenHands",
          "vendor": "OpenHands",
          "versions": [
            {
              "status": "affected",
              "version": "\u003c 1.5.0"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "OpenHands is software for AI-driven development. Starting in version 1.5.0, a Command Injection vulnerability exists in the `get_git_diff()` method at `openhands/runtime/utils/git_handler.py:134`. The `path` parameter from the `/api/conversations/{conversation_id}/git/diff` API endpoint is passed unsanitized to a shell command, allowing authenticated attackers to execute arbitrary commands in the agent sandbox. The user is already allowed to instruct the agent to execute commands, but this bypasses the normal channels. Version 1.5.0 fixes the issue."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "LOW",
            "baseScore": 7.6,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "LOW",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-78",
              "description": "CWE-78: Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-03-27T00:12:24.752Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw"
        },
        {
          "name": "https://github.com/OpenHands/OpenHands/pull/13051",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/OpenHands/OpenHands/pull/13051"
        },
        {
          "name": "https://docs.python.org/3/library/shlex.html#shlex.quote",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://docs.python.org/3/library/shlex.html#shlex.quote"
        },
        {
          "name": "https://docs.python.org/3/library/subprocess.html#security-considerations",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://docs.python.org/3/library/subprocess.html#security-considerations"
        },
        {
          "name": "https://owasp.org/www-community/attacks/Command_Injection",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://owasp.org/www-community/attacks/Command_Injection"
        }
      ],
      "source": {
        "advisory": "GHSA-7h8w-hj9j-8rjw",
        "discovery": "UNKNOWN"
      },
      "title": "OpenHands is Vulnerable to Command Injection through its Git Diff Handler"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2026-33718",
    "datePublished": "2026-03-27T00:12:24.752Z",
    "dateReserved": "2026-03-23T17:06:05.749Z",
    "dateUpdated": "2026-03-27T20:04:54.607Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-33718\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2026-03-27T01:16:19.483\",\"lastModified\":\"2026-03-30T13:26:29.793\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"OpenHands is software for AI-driven development. Starting in version 1.5.0, a Command Injection vulnerability exists in the `get_git_diff()` method at `openhands/runtime/utils/git_handler.py:134`. The `path` parameter from the `/api/conversations/{conversation_id}/git/diff` API endpoint is passed unsanitized to a shell command, allowing authenticated attackers to execute arbitrary commands in the agent sandbox. The user is already allowed to instruct the agent to execute commands, but this bypasses the normal channels. Version 1.5.0 fixes the issue.\"},{\"lang\":\"es\",\"value\":\"OpenHands es un software para el desarrollo impulsado por IA. A partir de la versi\u00f3n 1.5.0, existe una vulnerabilidad de inyecci\u00f3n de comandos en el m\u00e9todo \u0027get_git_diff()\u0027 en \u0027openhands/runtime/utils/git_handler.py:134\u0027. El par\u00e1metro \u0027path\u0027 del endpoint de API \u0027/api/conversations/{conversation_id}/git/diff\u0027 se pasa sin sanear a un comando de shell, permitiendo a atacantes autenticados ejecutar comandos arbitrarios en el sandbox del agente. Al usuario ya se le permite instruir al agente para ejecutar comandos, pero esto elude los canales normales. La versi\u00f3n 1.5.0 corrige el problema.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L\",\"baseScore\":7.6,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"LOW\"},\"exploitabilityScore\":2.8,\"impactScore\":4.7}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-78\"}]}],\"references\":[{\"url\":\"https://docs.python.org/3/library/shlex.html#shlex.quote\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://docs.python.org/3/library/subprocess.html#security-considerations\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/OpenHands/OpenHands/pull/13051\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://owasp.org/www-community/attacks/Command_Injection\",\"source\":\"security-advisories@github.com\"}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2026-33718\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-03-27T20:04:41.208442Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-03-27T20:04:51.082Z\"}}], \"cna\": {\"title\": \"OpenHands is Vulnerable to Command Injection through its Git Diff Handler\", \"source\": {\"advisory\": \"GHSA-7h8w-hj9j-8rjw\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 7.6, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L\", \"integrityImpact\": \"LOW\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"LOW\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"HIGH\"}}], \"affected\": [{\"vendor\": \"OpenHands\", \"product\": \"OpenHands\", \"versions\": [{\"status\": \"affected\", \"version\": \"\u003c 1.5.0\"}]}], \"references\": [{\"url\": \"https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw\", \"name\": \"https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw\", \"tags\": [\"x_refsource_CONFIRM\"]}, {\"url\": \"https://github.com/OpenHands/OpenHands/pull/13051\", \"name\": \"https://github.com/OpenHands/OpenHands/pull/13051\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://docs.python.org/3/library/shlex.html#shlex.quote\", \"name\": \"https://docs.python.org/3/library/shlex.html#shlex.quote\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://docs.python.org/3/library/subprocess.html#security-considerations\", \"name\": \"https://docs.python.org/3/library/subprocess.html#security-considerations\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://owasp.org/www-community/attacks/Command_Injection\", \"name\": \"https://owasp.org/www-community/attacks/Command_Injection\", \"tags\": [\"x_refsource_MISC\"]}], \"descriptions\": [{\"lang\": \"en\", \"value\": \"OpenHands is software for AI-driven development. Starting in version 1.5.0, a Command Injection vulnerability exists in the `get_git_diff()` method at `openhands/runtime/utils/git_handler.py:134`. The `path` parameter from the `/api/conversations/{conversation_id}/git/diff` API endpoint is passed unsanitized to a shell command, allowing authenticated attackers to execute arbitrary commands in the agent sandbox. The user is already allowed to instruct the agent to execute commands, but this bypasses the normal channels. Version 1.5.0 fixes the issue.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-78\", \"description\": \"CWE-78: Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2026-03-27T00:12:24.752Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2026-33718\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-03-27T20:04:54.607Z\", \"dateReserved\": \"2026-03-23T17:06:05.749Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2026-03-27T00:12:24.752Z\", \"assignerShortName\": \"GitHub_M\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


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 observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…