/

CVE-2026-55559

Severity:

CRITICAL RISK

(9.8)

Code Injection (CWE-94) in Yamcs Templating Engine

CVE-2026-55559

Awaiting Analysis

Vulnerability type

Category:

Code Injection

CWE:

CWE-94, CWE-470, CWE-1336

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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

A critical code injection vulnerability in Yamcs allows attacker-controlled template arguments from instance creation or update requests to alter generated YAML configuration. When the resulting configuration is loaded, an attacker may register a ProcessRunner service and execute operating-system commands as the Yamcs service account.

Affected context

The vulnerability occurs in Yamcs deployments that incorporate unescaped values from the /api/instances POST endpoint or the /api/instances/{instance} PATCH endpoint into YAML templates. Risk is greatest when the generated configuration is subsequently parsed and loaded as a Yamcs instance configuration, particularly where guest access or instance-creation privileges are available.

Exploit preconditions

  • Attack surface: Yamcs HTTP API endpoints for creating or updating instances
  • Required access: Guest superuser access in deployments without security.yaml, or the SystemPrivilege.CreateInstances privilege in secured deployments
  • Trigger point: Template rendering followed by configuration parsing and instance loading
  • Why exploitation is possible: User-controlled template arguments are inserted into YAML without context-aware escaping, allowing configuration structure to be changed and a process-execution service to be registered

Why this happens

The underlying bug is improper neutralization of user-controlled data before it is embedded in a YAML document. VarStatement.append inserts template arguments without applying YAML-context escaping, so values intended to be data can become configuration syntax when the rendered document is parsed. This maps primarily to CWE-94: Improper Control of Generation of Code, with related characteristics of CWE-1336: Improper Neutralization of Special Elements Used in a Template and CWE-470: Use of Externally-Controlled Input to Select Classes or Code.

Potential impact

  • An attacker may execute arbitrary operating-system commands as the Yamcs service account.
  • The Yamcs server process could be compromised.
  • Mission-control data and operational workflows could be altered or disrupted.
  • Credentials and other resources accessible to the service account could be exposed.
  • The compromised deployment could be used for lateral movement, depending on network and host permissions.

General mitigation guidance

Mitigation generally focuses on preventing untrusted values from becoming executable or structural configuration content.

Common defensive patterns include:

  • Apply context-aware escaping or structured serialization when inserting values into YAML.
  • Prefer typed configuration objects and safe YAML emitters over string-based template construction.
  • Validate template arguments against allowlisted schemas before rendering and again after parsing.
  • Restrict instance creation and update operations to explicitly authorized principals.
  • Avoid exposing privileged guest operations and separate service-management permissions from routine API access.
  • Run the Yamcs service with least privilege, limited filesystem access, and narrowly scoped network permissions.

How teams detect issues like this

Organizations can look for this issue through:

  • Static analysis rules identifying string concatenation or append operations that place request data into YAML or other structured configuration formats.
  • Code review checks for template variables used without context-specific encoding.
  • Tests that submit metacharacter-containing values and verify that they remain data after parsing.
  • API authorization reviews covering instance creation, instance updates, and guest privileges.
  • Runtime monitoring for unexpected instance definitions, newly registered process-execution services, and child processes launched by the Yamcs service account.
  • Policy enforcement that requires schema validation and approved service types before configurations are loaded.

Automated application-security and code-review tools may help identify unsafe template construction and externally controlled class or service selection.

Sources

SourceLink
github.comgithub.com/yamcs/yamcs/commit/549f295cf8c5496a5e799d6bec2432ef976c82aa
github.comgithub.com/yamcs/yamcs/commit/7192da1c49bdf5ab1d72e579a47766a7c43e87c8
github.comgithub.com/yamcs/yamcs/releases/tag/yamcs-5.12.8
github.comgithub.com/yamcs/yamcs/releases/tag/yamcs-5.13.2
github.comgithub.com/yamcs/yamcs/security/advisories/GHSA-73mf-m39p-wpm9

Frequently asked

questions

It can be remotely exploitable through the Yamcs API when an attacker has the required instance-management privilege or when guest superuser access is exposed by a deployment without security.yaml.

Secured deployments require SystemPrivilege.CreateInstances. Deployments lacking security configuration may expose the operation through the guest superuser, depending on their broader network and API exposure.

Treat template arguments as untrusted data, use structured YAML serialization or context-aware escaping, and enforce strict schema and service-type validation before loading the generated configuration.

Minimize string-based configuration generation, apply authorization at every configuration-changing endpoint, test parser boundaries with untrusted input, and run Yamcs under a least-privileged service account.

Find out what's already
exploitable in your codebase.