CVE-2026-33718 OpenHands is Vulnerable to Command Injection through its Git Diff Handler
Authenticated attackers can execute arbitrary commands in the agent sandbox via unsanitized input in the Git diff handler.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-33718?
CVE-2026-33718 is a high-severity command injection vulnerability in OpenHands, published on 27 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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.
Weakness: CWE-78
Which versions are affected by CVE-2026-33718?
3 open source packages ship an affected version, including openhands-ai. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
openhands-ai PyPI | All versions | 1.5.0 |
openhands-ai PyPI | All versions | 1.5.0 |
openhands-ai PyPI | All versions | 1.5.0 |
Products include Openhands Openhands.
How do I fix CVE-2026-33718?
Upgrade openhands-ai to 1.5.0 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-33718 being exploited?
There is no known exploitation of CVE-2026-33718 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-7h8w-hj9j-8rjw, PYSEC-2026-106.