AAK-AGENT-SERVER-NOAUTH-001
OpenHands sandbox agent server started without a session key
| Field | Value |
|---|---|
| Severity | HIGH; MEDIUM for a Docker launch on 1.52.0 or later, or on a release AAK cannot read, and for a compose service or docker run |
| Category | AGENT_CONFIG |
| Shipped | v0.6.29 |
| Scanner | agent_audit_kit/scanners/agent_server_noauth.py |
| CVE | CVE-2026-112346 (OpenHands Software Agent SDK before 1.52.0, NVD 9.8) |
| OWASP Agentic | ASI03 (Identity and Privilege Abuse), ASI05 (Unexpected Code Execution) |
What the SDK does
Read from its source, OpenHands/software-agent-sdk at v1.51.0, v1.52.0 and v1.59.0:
DockerWorkspace(with its subclassDockerDevWorkspace) andApptainerWorkspace, fromopenhands.workspacein theopenhands-workspacedistribution, start the sandbox agent server with--host 0.0.0.0.- They take no key and no bind host as arguments. The server reads its key
from the
OH_SESSION_API_KEYS_0environment variable, elseSESSION_API_KEY, and the launchers forward both throughforward_env. With neither set, the server logs a warning and accepts unauthenticated HTTP and WebSocket requests that run shell commands in the sandbox as root and read its secrets. - 1.52.0 (PR #5209) changed the Docker launcher only: its port is published
as
127.0.0.1:{host_port}:8000instead of{host_port}:8000, and its client now sends the forwarded key (before, it sent none). Without a key the server still starts keyless; from 1.52.0 only the host itself reaches it. ApptainerWorkspaceis unchanged by 1.52.0. In 1.59.0 it still runs the server with--host 0.0.0.0on the host's own network, and its client sendsSESSION_API_KEYonly.
What it catches
- Python source that constructs one of the launchers, imported from
openhands.workspaceor one of its modules (any alias), in a file that sets neither variable inos.environ, or with a literalforward_envthat leaves both out, so no key can reach the server. - A Docker launch is HIGH when the project locks, pins exactly or has
installed an
openhands-workspaceoropenhands-sdkrelease below 1.52.0, and MEDIUM from 1.52.0, or when no release can be read. - An Apptainer launch is HIGH in every release.
- A compose service whose image is
ghcr.io/openhands/agent-server, the SDK's own image, that publishes its port 8000 (or VS Code's 8001) on every interface ("8000:8000","0.0.0.0:8000:8000", a long-syntaxtarget: 8000withouthost_ip) and sets neither variable in its environment: MEDIUM. - A
docker runorpodman runof that image in a shell script, read the same way from its-pand-eoptions: MEDIUM.
127.0.0.1:8000:8000 or [::1]:8000:8000 is not reported, nor is a service
or command that sets either variable.
What it does not see
- A key set outside the Python file: the shell that runs it, a
.envfile, the agent-server config file. Such a launch is reported; setting the key in code (os.environ.setdefault("SESSION_API_KEY", ...)) before the launcher is built clears it. - A call through another name or a factory,
**arguments, and aforward_envthat is not a literal list: not judged. - A compose service with an
env_file, anddocker run --env-file: counted as keyed, since the file may hold the key. - Other images, Kubernetes manifests and a port given by a variable.
How to fix
Upgrade openhands-workspace to 1.52.0 or later: below it the Docker launcher
publishes the port on every interface and its client sends no key. Then set
SESSION_API_KEY in the environment that starts the workspace; both launchers
forward it to the server and send it with every request. For a compose service
or a docker run, publish the port on 127.0.0.1 and set the key in its
environment.
Related advisories
NVIDIA's NeMo Agent Toolkit advisory published the same week (CVE-2026-65145,
"missing authentication", affected 1.0 to 1.8.0, fixed in 1.9.0 per NVIDIA's
bulletin) names no component, so this rule has no shape for it. It is covered
only by AAK-KNOWN-VULN-001's version match, once OSV publishes a record for
nvidia-nat; on 29 Oct 2026 it had none.
Registry reference
This section is generated from the rule registry (agent_audit_kit/rules/builtin.py) when the documentation is built, so it follows the scanner. The rest of the page is hand-written; where the two disagree, the registry is what runs.
- Severity
- HIGH
- Category
- Agent Config (
agent-config) - Scanner
agent_audit_kit/scanners/agent_server_noauth.py- Auto-fixable
- No.
- SARIF name
AgentServerWithoutSessionKey
What it detects
Python source constructs an OpenHands DockerWorkspace, DockerDevWorkspace or ApptainerWorkspace that starts the sandbox agent server with no session key, or a compose service or docker run publishes the SDK's agent-server image on every interface without one. The launchers run the server with --host 0.0.0.0 and take its key only from the OH_SESSION_API_KEYS_0 or SESSION_API_KEY environment variable; with neither set, the server accepts unauthenticated HTTP and WebSocket requests that run shell commands in the sandbox as root and read its secrets (CVE-2026-112346, the OpenHands Software Agent SDK before 1.52.0). 1.52.0 publishes the Docker launcher's port on 127.0.0.1 only and changed nothing else: without a key the server still starts keyless, and the Apptainer launcher still binds every interface of the host in 1.59.0.
How to fix (registry)
Upgrade openhands-workspace to 1.52.0 or later (below it the Docker launcher publishes the port on every interface and its client sends no key), then set SESSION_API_KEY in the environment that starts the workspace: both launchers forward it to the server and send it with every request. For a compose service or a docker run, publish the port on 127.0.0.1 (127.0.0.1:8000:8000) and set the key in its environment.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-AGENT-SERVER-NOAUTH-001
Limitations
Reads Python source (*.py up to 512 KB) for a call that constructs DockerWorkspace, DockerDevWorkspace or ApptainerWorkspace imported from openhands.workspace or one of its modules; a call through another name, a factory, ** arguments or a forward_env that is not a literal list or tuple is not judged. A file that sets SESSION_API_KEY or OH_SESSION_API_KEYS_0 in os.environ (by assignment, setdefault, update or putenv) counts as keyed; a key set in the shell, a .env file or the agent-server config file is not seen, so such a launch is reported. A Docker launch is HIGH when the lowest openhands-workspace or openhands-sdk release the project locks, pins exactly or has installed, anywhere under the root, is below 1.52.0, and MEDIUM from 1.52.0 or when none is found; an Apptainer launch is HIGH in every release. A YAML file with services is read for a service whose image is ghcr.io/openhands/agent-server and that publishes container port 8000 or 8001 without a loopback host IP and sets neither variable in environment; a service with an env_file is not judged. A docker run or podman run of that image in a *.sh script is read the same way from its -p and -e options, and --env-file counts as keyed. Other images, Kubernetes manifests and a port given by a variable are not read. NVIDIA's NeMo Agent Toolkit advisory of the same week names no component, so this rule has no shape for it.
References
- CVE: CVE-2026-112346
- OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse), ASI05 (Unexpected Code Execution (RCE))
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-AUTH-01 (Missing Authentication)
- CSA AI Controls Matrix (AICM): IAM-01, IVS-04