{
  "id": "docker-sandboxes-kit-keys",
  "url": "https://ohshit.app/incidents/docker-sandboxes-kit-keys/",
  "title": "Docker Sandboxes fixes approved agent kits redirecting stored API keys after an update",
  "level": 3,
  "level_name": "sharted",
  "date": "2026-11-30",
  "date_is_approximate": false,
  "updated": null,
  "tags": [
    "Docker",
    "Sandboxes",
    "credentials",
    "agent kits"
  ],
  "ecosystems": [
    "docker"
  ],
  "summary": "Docker Sandboxes 0.43.0–before 0.55.0 can reuse a service approval after a third-party kit changes its credential destination. The host proxy can then send the real provider key to that destination. Upgrade to 0.55.0, review approvals and rotate potentially exposed keys; no real-world attacks are reported in the sources.",
  "splash": "Local Docker Sandboxes users who approved a service for a third-party kit and later launch a modified kit using that binding",
  "wipe": "Upgrade to 0.55.0 or newer, preserve security settings, remove untrusted kit approvals and rotate potentially exposed provider keys",
  "in_the_wild": "no",
  "source_exception": null,
  "cves": [
    {
      "id": "CVE-2026-136998",
      "score": 5.6,
      "name": "Credential destination approval is recorded but not enforced",
      "description": "Docker's CNA rates CVSS 4.0 at 5.6 Medium; the researcher rates CVSS 3.1 at 8.2 High and CVSS 4.0 at 6.9 Medium, including subsequent-provider impact."
    }
  ],
  "fixed": [
    {
      "product": "Docker Sandboxes",
      "version": "0.55.0",
      "status": "Enforces approved API-key and OAuth destinations; empty destination bindings grant no access"
    }
  ],
  "checklist": [
    {
      "title": "Upgrade the local Sandboxes installation and daemon",
      "hint": "Install Docker Sandboxes 0.55.0 or newer and check sbx version, including the build ID. Before upgrading, migrate environment-variable overrides using sbx settings set <key> <value> and the release notes' complete mapping. In particular, preserve kit.allowedSources, kit.allowLocalKits, kit.ignoreTransparencyLog, kit.requireSignature and kit.trustedSigners policies; for an existing signature requirement, save sbx settings set kit.requireSignature true. Without saved settings or administrator policy, signatures are optional and local kits are allowed. Restart a daemon from a different build."
    },
    {
      "title": "Review and remove approvals granted to untrusted third-party kits",
      "hint": "Inspect ~/.config/sbx/credentials.yaml, or %APPDATA%\\sbx\\credentials.yaml on Windows, and remove the relevant service bindings you granted to third-party kits until reviewed. The file stores approvals, not the secrets themselves. Removing a sandbox does not remove its approval. Stop running untrusted kits with stored provider credentials; a missing or empty destination approval on the fixed version must not be treated as authorization."
    },
    {
      "title": "Revoke and rotate keys that may have reached a modified kit",
      "hint": "If an approved third-party kit changed, revoke potentially exposed keys through the provider's official controls, issue replacements and update your stored Sandboxes credentials. Review provider usage and GitHub token activity/scopes for unauthorized spend or repository changes. sbx secret set is global by default for provider keys; use --sandbox <name> for a sandbox-scoped credential and restrict its provider privileges. A narrower scope limits impact but does not replace the upgrade."
    },
    {
      "title": "Review the exact kit and preserve evidence without relying on policy logs alone",
      "hint": "Check inject domains and permissions.network.allow on every sbx create; pin an immutable commit or a reviewed local copy instead of a movable tag or branch where possible. Preserve kit versions, approval configuration and relevant logs without publishing secrets. In the vulnerable reproduction, sbx policy log records an allowed connection but not the credential injection. A matching path or unexpected domain alone does not prove theft; the report's loopback canary, example domains and dummy token are test artifacts, not attack indicators."
    },
    {
      "title": "Apply the release's credential migration requirements",
      "hint": "Use HTTPS for external endpoints that receive host credentials; 0.55.0 withholds substitution on ordinary HTTP. For custom secrets, check sbx secret ls, bind any nonstandard header with sbx secret set-custom --placeholder <placeholder> --header <header>, adding --sandbox <name> when scoped, or use secret.custom.defaultHeaders. Custom secrets shorter than eight characters stop being substituted and need longer replacements; built-in provider keys are exempt. Restart daemons older than API 0.53.0 before using secrets without explicit header bindings. Consult the release notes for the full upgrade actions."
    }
  ],
  "sources": [
    {
      "name": "Endor Labs original research and local reproduction",
      "url": "https://www.endorlabs.com/learn/cve-2026-136998-docker-sandboxes",
      "says": "November 30 disclosure, dummy-key test, consent persistence, shared service path, attack prerequisites, researcher scores, limitations and approval/key-rotation mitigations.",
      "primary": true
    },
    {
      "name": "Docker CNA CVE record",
      "url": "https://cveawg.mitre.org/api/cve/CVE-2026-136998",
      "says": "Published December 1; affected 0.43.0–before 0.55.0 on macOS/Linux/Windows, fixed 0.55.0, required operator actions and vendor CVSS 4.0 5.6. CISA ADP records exploitation as none.",
      "primary": true
    },
    {
      "name": "Docker Sandboxes 0.55.0 release notes",
      "url": "https://github.com/docker/sbx-releases/releases/tag/v0.55.0",
      "says": "November 30 release confirms destination enforcement for API keys/OAuth and gives settings, HTTPS and custom-secret migration requirements.",
      "primary": true
    },
    {
      "name": "Docker credential configuration documentation",
      "url": "https://docs.docker.com/ai/sandboxes/configuration/credentials/",
      "says": "Describes host-side substitution, global and sandbox credential scope, approval-file locations and separate approved API-key/OAuth domains.",
      "primary": true
    }
  ],
  "headline": null,
  "one_liner": null,
  "in_the_wild_note": "Researcher demonstrates a local dummy-key PoC; cited sources report no real-world attacks",
  "mitigation": null,
  "timeline": [
    {
      "date": "Sep 21, 2026",
      "title": "Researcher reports the finding to Docker",
      "body": "Peyton Kennedy identifies the report as ENDOR-VUL-2026-21091. This is a private-report date, not public disclosure."
    },
    {
      "date": "Nov 30, 2026",
      "title": "Docker releases 0.55.0 and Endor Labs publishes the reproduction",
      "body": "The researcher demonstrates a changed kit destination receiving a dummy credential on a local canary server. Docker's release notes confirm the destination-enforcement fix."
    },
    {
      "date": "Dec 1, 2026",
      "title": "Docker's CNA publishes the CVE record",
      "body": "The record specifies 0.43.0 through versions before 0.55.0 on macOS, Linux and Windows, with prior operator approval and a subsequent modified-kit launch required. The research post was already public on November 30."
    }
  ],
  "body_markdown": "An agent kit can be honest when first approved and hostile when fetched again. Endor Labs' November 30 report describes **CVE-2026-136998** in local **Docker Sandboxes**, the `sbx` CLI and `sandboxd`. An operator first approves a provider service and its displayed destination. A later version at the same kit reference changes its credential-injection domain and can add the corresponding network permission. Vulnerable builds see an existing service binding and do not request a new decision. The host proxy then substitutes the stored real key into a request to the changed destination.\n\nThe prerequisite is an existing approval followed by execution of a modified third-party kit. The attacker need not already control the developer's host, but this is not an unauthenticated remote attack against every Docker installation. The microVM isolation boundary need not fail, and the raw key need not enter the guest. The defect is in the host's authorization of where it sends the credential. Approvals survive sandbox teardown. The researcher demonstrated a version swap; a broader cross-kit reuse case is inferred from the design, not separately demonstrated.\n\nThe published test used a sandbox-scoped **dummy Anthropic credential** and a loopback canary on macOS 15.6 arm64 with 0.43.0. It did not steal a real key or contact an outside victim. The researcher identifies a shared path for thirteen built-in services: anthropic, copilot, cursor, devin, droid, github, google, groq, mistral, nebius, openai, openrouter and xai. Only anthropic was demonstrated; the other twelve were not separately tested. Docker's CNA lists macOS, Linux and Windows. Its range starts at 0.43.0 and ends before 0.55.0; versions before 0.43.0 are not assessed as safe against every other credential risk.\n\n**Upgrade to 0.55.0 or newer.** Docker's November 30 release confirms that API-key and OAuth injection now enforces approved destinations and treats destination-less bindings as missing. Current documentation keeps API-key and OAuth domain approvals separate. Preserve existing security settings before the upgrade: this release stops reading several old environment variables, including controls for kit signatures, allowed sources and local kits. It also requires HTTPS for external credential substitution and introduces custom-secret header and length requirements. Use the concrete migration steps above and the complete release mapping rather than silently dropping an existing policy.\n\nFor a potentially changed third-party kit, remove its approvals and revoke/rotate the affected provider credentials; upgrading does not invalidate a key already disclosed. Provider keys are global by default, so multiple sandboxes can share the same exposed key. Impact depends on the credential: metered model usage can incur charges, while a GitHub token's permissions determine possible repository access. Provider-side audit and usage records matter because the demonstrated vulnerable policy log omits credential injection. The sources supply no actual attacker infrastructure or victim/loss count.\n\nThis is rated L3 for a public reproduction in a developer platform, rather than confirmed exploitation. Docker's CNA assigns **CVSS 4.0 5.6 Medium**; the researcher assigns **CVSS 3.1 8.2 High** and **CVSS 4.0 6.9 Medium**, including subsequent-system impact. These are distinct assessments, not interchangeable scores. No real-world attack is reported in the cited sources. The earlier file-copy issue **CVE-2026-103916**, fixed in 0.51.0, is a separate vulnerability and does not fix this one."
}