# CVE-2026-24516: DigitalOcean Droplet Agent: Command Injection via Metadata Service Endpoint

> An attacker controlling metadata responses can inject arbitrary OS commands executed with root privileges via the Droplet Agent's troubleshooting component.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Mar 2026
- **Updated:** 24 Mar 2026
- **Also known as:** GHSA-fh3m-562m-w4f6, GO-2026-4854

## What is CVE-2026-24516?

CVE-2026-24516 is a high-severity command injection vulnerability in n/a, published on 23 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A command injection vulnerability exists in DigitalOcean Droplet Agent through 1.3.2. The troubleshooting actioner component (internal/troubleshooting/actioner/actioner.go) processes metadata from the metadata service endpoint and executes commands specified in the TroubleshootingAgent.Requesting array without adequate input validation. While the code validates that artifacts exist in the validInvestigationArtifacts map, it fails to sanitize the actual command content after the "command:" prefix. This allows an attacker who can control metadata responses to inject and execute arbitrary OS commands with root privileges. The attack is triggered by sending a TCP packet with specific sequence numbers to the SSH port, which causes the agent to fetch metadata from http://169.254.169.254/metadata/v1.json. The vulnerability affects the command execution flow in internal/troubleshooting/actioner/actioner.go (insufficient validation), internal/troubleshooting/command/exec.go (direct exec.CommandContext call), and internal/troubleshooting/command/command.go (command parsing without sanitization). This can lead to complete system compromise, data exfiltration, privilege escalation, and potential lateral movement across cloud infrastructure.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2026-24516?

3 open source packages ship an affected version, including github.com/digitalocean/droplet-agent.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/digitalocean/droplet-agent` | Go | All versions | None |
| `github.com/digitalocean/droplet-agent` | Go | All versions to 0.0.0-20260107162243-1101ffcb5672 | None |
| `github.com/digitalocean/droplet-agent` | Go | All versions to 0.0.0-20260107162243-1101ffcb5672 | None |

## How do I fix CVE-2026-24516?

Upgrade to a fixed version.

## Is CVE-2026-24516 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-24516 exists.

Public exploit code:

- Critical Pre-Auth Root RCE (CVSS 10.0) in DigitalOcean Droplet Agent up to v1.3.2 via Command Injection. (github_poc): https://github.com/poxsky/CVE-2026-24516-DigitalOcean-RCE
- Technical analysis and PoC for CVE-2026-24516: Unauthenticated Root Remote Code Execution in DigitalOcean Droplet Agent (CVSS 10.0). (github_poc): https://github.com/poxsky/CVE-2026-24516-DigitalOcean-RCE.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-24516 and fix it if it is affected.

What it is: CVE-2026-24516 is a high-severity command injection vulnerability in n/a, published on 23 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-24516 exists.

Affected packages and fixed versions:
- github.com/digitalocean/droplet-agent (Go): affected all versions; no fix listed
- github.com/digitalocean/droplet-agent (Go): affected all versions up to 0.0.0-20260107162243-1101ffcb5672; no fix listed
- github.com/digitalocean/droplet-agent (Go): affected all versions up to 0.0.0-20260107162243-1101ffcb5672; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-24516/ (Markdown: https://insights.sbomify.com/CVE-2026-24516/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-24516
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-24516
- OSV: https://osv.dev/vulnerability/CVE-2026-24516

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-24516/
Summaries are generated and may contain mistakes; the official description above is the record.
