Back to plugin

Security audit

Codex

Security checks for vulnerabilities and agentic risk

Overview

The scanners report a configuration-dependent risk: remote plaintext WebSocket connections can expose credentials and traffic, while the overall verdict is benign because the finding describes a transport weakness, not intentional harm.

The verdict is benign, but the reported risk matters if you plan to use a remote app-server connection. Avoid remote `ws://` connections; use `wss://` or a separately secured tunnel, and consider rotating credentials if they may have crossed an untrusted network. The finding does not apply to the default stdio transport.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

other

Warning
Location
plugin/dist/.setup/config-options-CsLZNDe3.mjs:510
Finding

Remote WebSocket Transport Allows Cleartext Transmission of Credentials and Agent Traffic ## Remediation Suggestions 1. **Require TLS for remote WebSocket connections.** Parse the configured URL and reject every non-loopback destination unless its scheme is `wss:`. Enforce this alongside the existing remote-authentication requirement. 2. **Validate schemes explicitly.** For WebSocket transport, accept only `ws:` and `wss:`. Restrict plaintext `ws:` to strictly validated loopback addresses. Preserve the separate Unix-socket transport boundary. 3. **Add defense-in-depth validation at connection creation.** Apply the same transport-security policy immediately before constructing the WebSocket connection so alternate callers cannot bypass configuration validation. 4. **Maintain certificate verification.** Do not disable TLS certificate or hostname verification. Where private certificate authorities are necessary, configure an explicit trust store. 5. **Add regression tests.** Verify that remote `ws://` URLs are rejected even with valid credentials, remote `wss://` URLs still require authentication, and intended loopback and Unix-socket connections continue to work. 6. **Address existing exposure.** Identify plaintext remote deployments, migrate them to TLS or a separately secured tunnel, and rotate credentials that may have traversed untrusted networks.

Content
View full analysis

Vulnerability Details

File Location:

  • plugin/dist/.setup/config-options-CsLZNDe3.mjs:510–519
  • plugin/dist/.setup/transport-websocket-BazDtpsr.mjs:30–47

Vulnerability Type: CWE-319 — Cleartext Transmission of Sensitive Information
Risk Level: Medium

Vulnerable Code

The connection-security check requires authentication for remote connections but does not require encrypted transport:

javascript
function inferCodexAppServerConnectionClass(params) {
	if (params.transport !== "websocket") return "local-loopback";
	const parsed = params.url ? URL.parse(params.url) : null;
	return (parsed?.protocol === "ws:" || parsed?.protocol === "wss:") && isLoopbackHost(parsed.hostname) ? "local-loopback" : "remote";
}
/** Applies the canonical remote-auth boundary to any Codex AppServer transport. */
function assertCodexAppServerConnectionSecurity(params) {
	if (inferCodexAppServerConnectionClass(params) === "remote" && !readNonEmptyString(params.authToken) && !Object.entries(params.headers).some(([key, value]) => key.trim().toLowerCase() === "authorization" && Boolean(readNonEmptyString(value)))) throw new Error("remote Codex app-server WebSocket URLs require appServer.authToken or an Authorization header");
}

The transport then forwards credentials and the configured URL directly to the WebSocket implementation:

javascript
/** Opens a WebSocket app-server transport and maps newline-delimited frames to stdout/stdin. */
function createWebSocketTransport(options) {
	if (!options.url) throw new Error("codex app-server websocket transport requires plugins.entries.codex.config.appServer.url");
	const events = new EventEmitter();
	const stdout = new PassThrough();
	const stderr = new PassThrough();
	const websocketOptions = {
		headers: {
			...options.headers,
			...options.authToken ? { Authorization: `Bearer ${options.authToken}` } : {}
		},
		perMessageDeflate: false,
		...options.transport === "websocket" ? { handshakeTimeout: WEBSOCKET_HANDS
...[truncated 3025 chars]

SkillSpector was not run because this plugin release contains no bundled skills.

Endor dependency reachability

Checked Nov 19, 2026 · 3:33 PM UTC

No reachable vulnerabilities reported

Endor dependency scan completed.