Intel

AIKIDO-2026-885887

@openai/codex is vulnerable to Uncontrolled Search Path Element

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Oct 15, 2026
October 15, 2026

64

CVE Score

Medium

Uncontrolled Search Path Element

Are you affected? Scan for Free

TL;DR

Codex resolves the bwrap and rg helper executables by searching PATH before the Linux sandbox is constructed, without checking whether the resolved binary is writable by the current user. A workspace or PATH entry containing an attacker-controlled, writable executable with a matching name runs with the caller's full privileges before any sandbox confinement takes effect. This lets code from an untrusted repository or directory execute outside the intended sandbox boundary. The fix resolves these helper executables through a permission-aware lookup that rejects writable or replaceable candidates.

How do I fix this?

Upgrade the @openai/codex and/or the @openai/codex-sdk library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you run Codex against a workspace or PATH that can contain an untrusted, writable bwrap or rg executable.

Versions

0.0.1 - 0.161.0

Fixed in 0.162.0

Background info

@openai/codex is vulnerable to Uncontrolled Search Path Element in versions 0.0.1 - 0.161.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea