Codex Image Server

PassAudited by VirusTotal on May 10, 2026.

Overview

Type: OpenClaw Skill Name: codex-image-server Version: 0.1.0 The skill bundle contains a significant path traversal vulnerability in the `templates/codex-image-server.js` file, specifically within the `/v1/images/:id/file` route. The `id` parameter is extracted from the URL and used in a `path.join` operation without sanitization, potentially allowing an attacker to read arbitrary files from the host system. Additionally, the server template executes local system commands via `child_process.spawn` to interact with the `codex` CLI and manages sensitive credentials like `OPENAI_API_KEY`. While these high-privilege capabilities are aligned with the skill's stated purpose of wrapping a local image generation tool, the lack of input validation on file paths constitutes a meaningful security risk.

Findings (0)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

A web page or local app may be able to trigger image generation through the local server, potentially using the user's Codex/OpenAI access or quota.

Why it was flagged

The server template allows cross-origin browser access. Combined with the documented default of optional authentication, this broadens who can call the local image-generation API.

Skill content
'Access-Control-Allow-Origin': '*'
Recommendation

Enable authentication by default, restrict CORS origins to trusted local clients, and require explicit user approval before exposing generation endpoints.

What this means

The server may use the user's OpenAI account and billing unexpectedly, and prompts or reference images may be processed through that provider path.

Why it was flagged

The template reads a local OpenAI API key and automatically switches to an OpenAI backend when a key is present, despite the registry metadata declaring no credentials.

Skill content
function getOpenAiApiKey() {
  return process.env.CODEX_IMAGE_SERVER_OPENAI_API_KEY || process.env.OPENAI_API_KEY || ''
}
...
return getOpenAiApiKey() ? 'openai' : 'codex-exec'
Recommendation

Declare the credential requirement, avoid auto-selecting the provider backend from ambient OPENAI_API_KEY, and require an explicit backend choice before using account credentials.

What this means

Running the server can start and terminate local Codex worker processes.

Why it was flagged

The design intentionally starts local `codex exec` worker processes and manages their process groups. This is expected for a wrapper service but is still local code/process execution.

Skill content
On macOS and Linux, start `codex exec` with `detached: true` and kill the negative process id so child processes do not remain alive.
Recommendation

Run it only from a trusted project directory and verify cancellation/cleanup so no worker processes are left running.

NoteHigh Confidence
ASI10: Rogue Agents
What this means

Generated images may remain on disk and be available through the local server while it is running.

Why it was flagged

The skill intentionally creates a local service with persistent output files. This is coherent with the image-server purpose, but users should notice the ongoing service and stored outputs.

Skill content
Store generated files in a stable output directory and return both metadata and file URLs.
Recommendation

Choose a private output directory, periodically clean generated files, and stop the server when it is no longer needed.