/

CVE-2026-63378

Severity:

HIGH RISK

(8.8)

Python Code Injection (CWE-94) in TAKO AI Agent for Okta

CVE-2026-63378

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution and Container Compromise

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

TAKO AI Agent for Okta allows an authenticated user to submit Python source that bypasses validation and is executed by the application process. The issue becomes especially risky when the service runs with elevated container privileges, potentially exposing tenant credentials, application data, and backend services.

TAKO AI Agent for Okta allows an authenticated user to submit Python source that bypasses validation and is executed by the application process. The issue becomes especially risky when the service runs with elevated container privileges, potentially exposing tenant credentials, application data, and backend services.

Affected context

The vulnerability occurs in deployments where the React execution API accepts user-controlled Python source and passes it through incomplete validation before launching a subprocess. Any authenticated account with a valid session cookie may reach the script execution workflow, including deployments where the service process has access to sensitive environment variables, databases, or internal network resources.

The vulnerability occurs in deployments where the React execution API accepts user-controlled Python source and passes it through incomplete validation before launching a subprocess. Any authenticated account with a valid session cookie may reach the script execution workflow, including deployments where the service process has access to sensitive environment variables, databases, or internal network resources.

Exploit preconditions

  • Attack surface: Authenticated HTTP access to the script execution API
  • Required access: A valid fctr_session cookie; administrator privileges are not required
  • Trigger point: Submission of Python source through the script_code field, followed by the execution workflow
  • Why exploitation is possible: Content filtering can be bypassed, and incomplete AST and built-in validation permits dynamically resolved operations to reach subprocess execution
  • Execution context: The accepted source runs as the application process user, which may be root in default container configurations
  • Attack surface: Authenticated HTTP access to the script execution API
  • Required access: A valid fctr_session cookie; administrator privileges are not required
  • Trigger point: Submission of Python source through the script_code field, followed by the execution workflow
  • Why exploitation is possible: Content filtering can be bypassed, and incomplete AST and built-in validation permits dynamically resolved operations to reach subprocess execution
  • Execution context: The accepted source runs as the application process user, which may be root in default container configurations

Why this happens

The underlying flaw is insufficiently complete validation of user-controlled source code before execution, mapping to CWE-94: Improper Control of Generation of Code. The security checks focus on selected syntax forms and direct import patterns, but do not comprehensively model dynamically resolved built-ins, call expressions, or equivalent execution paths. Because the accepted source is written to a temporary file and launched as a subprocess, validation gaps become arbitrary code execution rather than merely unsafe data processing.

The underlying flaw is insufficiently complete validation of user-controlled source code before execution, mapping to CWE-94: Improper Control of Generation of Code. The security checks focus on selected syntax forms and direct import patterns, but do not comprehensively model dynamically resolved built-ins, call expressions, or equivalent execution paths. Because the accepted source is written to a temporary file and launched as a subprocess, validation gaps become arbitrary code execution rather than merely unsafe data processing.

Potential impact

  • An attacker may execute arbitrary Python or operating-system commands within the application container.
  • The compromise could expose Okta API tokens, JWT signing material, and other environment secrets.
  • An attacker could access or modify the local SQLite database.
  • The process may permit pivoting to backend services or other reachable systems.
  • The attacker could establish persistence or tamper with application behavior.
  • An attacker may execute arbitrary Python or operating-system commands within the application container.
  • The compromise could expose Okta API tokens, JWT signing material, and other environment secrets.
  • An attacker could access or modify the local SQLite database.
  • The process may permit pivoting to backend services or other reachable systems.
  • The attacker could establish persistence or tamper with application behavior.

General mitigation guidance

Mitigation generally centers on removing the need to execute user-controlled source and reducing trust in authenticated input.

Common defensive patterns include:

  • Prefer declarative, narrowly scoped operations or a dedicated interpreter with an explicit allowlist over general-purpose Python execution.
  • Apply complete, semantics-aware validation before any source is stored or executed; do not rely solely on pattern matching or partial AST checks.
  • Treat all client-submitted code as untrusted, regardless of session authentication or AI-generated workflow context.
  • Run the service as a non-root user with minimal filesystem, network, database, and secret access.
  • Isolate any unavoidable execution in a hardened sandbox with resource limits, restricted system calls, and no access to sensitive credentials.
  • Keep secrets outside the process environment where feasible and enforce least-privilege service identities.

Mitigation generally centers on removing the need to execute user-controlled source and reducing trust in authenticated input.

Common defensive patterns include:

  • Prefer declarative, narrowly scoped operations or a dedicated interpreter with an explicit allowlist over general-purpose Python execution.
  • Apply complete, semantics-aware validation before any source is stored or executed; do not rely solely on pattern matching or partial AST checks.
  • Treat all client-submitted code as untrusted, regardless of session authentication or AI-generated workflow context.
  • Run the service as a non-root user with minimal filesystem, network, database, and secret access.
  • Isolate any unavoidable execution in a hardened sandbox with resource limits, restricted system calls, and no access to sensitive credentials.
  • Keep secrets outside the process environment where feasible and enforce least-privilege service identities.

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules that flag subprocess execution, temporary script creation, dynamic evaluation, and interpreters receiving user-controlled data.
  • Code review checks for incomplete AST validation, string-based import resolution, dynamic built-in lookup, and allowlists that include reflective functions.
  • Runtime monitoring for unexpected child processes, script files, command execution, and access to environment secrets from the application.
  • API and policy controls that restrict script-execution endpoints to explicitly authorized administrative workflows and record authenticated invocation events.
  • Automated security review tools can help identify unsafe data flows from HTTP fields to interpreters or subprocess APIs.

Detection approaches may include:

  • Static analysis rules that flag subprocess execution, temporary script creation, dynamic evaluation, and interpreters receiving user-controlled data.
  • Code review checks for incomplete AST validation, string-based import resolution, dynamic built-in lookup, and allowlists that include reflective functions.
  • Runtime monitoring for unexpected child processes, script files, command execution, and access to environment secrets from the application.
  • API and policy controls that restrict script-execution endpoints to explicitly authorized administrative workflows and record authenticated invocation events.
  • Automated security review tools can help identify unsafe data flows from HTTP fields to interpreters or subprocess APIs.

Sources

SourceLink
github.comgithub.com/fctr-id/okta-ai-agent/commit/3b5ccaff8423cdfa6d26f5e133c01b8b71148df4
github.comgithub.com/fctr-id/okta-ai-agent/releases/tag/v3.0.1-beta
github.comgithub.com/fctr-id/okta-ai-agent/security/advisories/GHSA-r9q7-6784-7rc6

Frequently asked

questions

Any authenticated user with a valid fctr_session cookie may be able to reach the affected execution path; administrator privileges are not inherently required.

It requires access to the application's authenticated HTTP interface. The resulting code runs locally in the application container but may reach secrets, databases, and backend services available to that container.

The safest pattern is to eliminate general-purpose execution of user-controlled Python. If execution is unavoidable, use a tightly restricted interpreter or sandbox with complete validation and minimal privileges.

Treat authenticated input as untrusted, test validation against equivalent dynamic execution paths, restrict reflective capabilities, monitor subprocess creation, and run application components with least privilege.

Any authenticated user with a valid fctr_session cookie may be able to reach the affected execution path; administrator privileges are not inherently required.

It requires access to the application's authenticated HTTP interface. The resulting code runs locally in the application container but may reach secrets, databases, and backend services available to that container.

The safest pattern is to eliminate general-purpose execution of user-controlled Python. If execution is unavoidable, use a tightly restricted interpreter or sandbox with complete validation and minimal privileges.

Treat authenticated input as untrusted, test validation against equivalent dynamic execution paths, restrict reflective capabilities, monitor subprocess creation, and run application components with least privilege.

Find out what's already
exploitable in your codebase.