/

CVE-2026-46621

Severity:

CRITICAL RISK

(9.1)

Remote Code Execution via Python Algorithms in Yamcs

CVE-2026-46621

Analyzed

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.1)

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

Yamcs' Python algorithm engine previously compiled and executed user-provided algorithm code via Jython without a secure sandbox, allowing arbitrary Java class imports and execution.

An authenticated user with ChangeMissionDatabase privileges could modify existing Python algorithms through the mission database API and achieve remote code execution on the host system.

Affected context

The vulnerability affects Yamcs deployments that:

  • Enable Python-based algorithms evaluated via the JSR-223 ScriptEngine
  • Allow authenticated users with ChangeMissionDatabase privileges to edit mission database algorithms through REST APIs or UI
  • Execute algorithm code within the same JVM as the core mission control services, without a hardened sandbox

The risk is elevated where algorithm execution occurs on mission-critical servers or hosts with broad network or system access.

Exploit preconditions

  • Attack surface: Authenticated application interface (mission database REST API or equivalent management UI)
  • Required access: Valid Yamcs account with ChangeMissionDatabase privilege (or similar administrative/engineering role)
  • Trigger point: Updating an existing Python algorithm's text so that, when compiled and executed, it imports and uses arbitrary Java classes
  • Why exploitation is possible: The script engine compiles and runs user-controlled Python code via Jython within the main JVM without sandboxing, allowing direct access to Java runtime APIs from algorithm logic

Why this happens

The core issue stems from executing dynamically provided code without adequate sandboxing or restriction, mapping directly to CWE-94: Improper Control of Generation of Code (Code Injection).

Yamcs' Python algorithm evaluation uses the JSR-223 ScriptEngine with Jython to compile and run algorithm text that is editable by privileged users.

Because the execution environment exposes the full Java classpath and does not enforce a security manager, class whitelist, or restricted execution context, algorithm authors can import and invoke sensitive Java classes (for example, process execution or file I/O).

This creates a situation where configuration-level changes (algorithm edits) effectively become arbitrary code deployment inside the mission control runtime.

Potential impact

  • Arbitrary command execution on the underlying host operating system
  • Full compromise of the Yamcs server process and its in-memory data
  • Unauthorized access to mission telemetry, commanding workflows, or operational data
  • Lateral movement within the hosting environment or broader network
  • Installation of persistent backdoors or modification of mission logic

General mitigation guidance

Mitigation generally focuses on removing or constraining dynamic code execution and limiting who can alter executable configuration:

  • Prefer declarative or configuration-driven algorithms over free-form script execution where feasible
  • If scripting is required, use sandboxed interpreters with explicit allowlists of APIs and controlled resource access
  • Separate the execution environment of user-editable algorithms from the core mission control JVM, for example via isolated worker processes with reduced privileges
  • Restrict the ChangeMissionDatabase (or equivalent) privilege to a minimal set of trusted operators and enforce strong authentication controls
  • Introduce change control for mission database modifications, including approvals, code review, and audit logging for algorithm edits
  • Apply least-privilege at the OS and container level so that, even if algorithm code is abused, the process has limited system access

How teams detect issues like this

Detection approaches typically combine configuration review, runtime monitoring, and static analysis of algorithm content:

  • Periodically review mission database entries for algorithms, looking for suspicious imports, process execution calls, or non-domain-related logic
  • Implement static checks or linters for algorithm scripts that flag usage of sensitive Java or system APIs
  • Use application audit logs to track who modifies algorithms, with alerts for changes outside normal maintenance windows or by unusual accounts
  • Monitor host-level telemetry (process creation, outbound network connections, file modifications) to detect anomalous behavior from the Yamcs process
  • Integrate automated security review tools into the mission database change workflow, enforcing policy checks before algorithm updates are deployed

Sources

SourceLink
github.comgithub.com/yamcs/yamcs/commit/3c550348f866af4675d2ba4a51d8d12b7c7c6011
github.comgithub.com/yamcs/yamcs/commit/4ff8fda642ea8c3309a4d3f379aa77b763148992
github.comgithub.com/yamcs/yamcs/releases/tag/yamcs-5.12.7
github.comgithub.com/yamcs/yamcs/releases/tag/yamcs-5.13.0
github.comgithub.com/yamcs/yamcs/security/advisories/GHSA-2g95-6x5q-xjwj

Frequently asked

questions

Yes, but only through authenticated interfaces. An attacker must be able to reach the Yamcs mission database API or management interface and authenticate with sufficient privileges to modify algorithms.

The attacker needs a Yamcs account with ChangeMissionDatabase (or equivalent) privileges that permit editing existing Python algorithms. Without this role, they cannot directly alter the executable algorithm content.

The safest pattern is to disable live editing of executable scripts by default, remove generic dynamic code execution where possible, and, when scripting is unavoidable, restrict execution to a tightly sandboxed environment with a minimal, well-defined API surface.

Design features that involve dynamic code or configuration with a clear threat model: treat user-supplied scripts as untrusted, keep them out of the core runtime, enforce strict role-based access control and approvals for changes, and integrate automated security checks into the deployment pipeline for mission database updates.

Find out what's already
exploitable in your codebase.