/

CVE-2026-55511

Severity:

CRITICAL RISK

(9.1)

Code Injection (CWE-94) in Yamcs StreamSQL Compiler

CVE-2026-55511

Awaiting Analysis

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Arbitrary Code Execution

Severity:

CRITICAL RISK

(9.1)

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 an authorized user with the ControlArchiving system privilege to cause user-controlled StreamSQL column names to become part of generated Java source code.

When the affected query path compiles this source with Janino, the Yamcs server process may execute attacker-controlled Java code, potentially exposing sensitive mission data and credentials or disrupting operations.

Affected context

The vulnerability occurs in Yamcs deployments where an authorized archiving-control user can submit SQL through the archive execution API and where StreamSQL expressions are compiled into Java source. It is associated with generated code for aggregate expressions, including sum operations, when a crafted double-quoted column name reaches the source-generation and compilation path.

Exploit preconditions

  • Attack surface: The Yamcs archive SQL execution API
  • Required access: An authenticated user or service account with SystemPrivilege.ControlArchiving
  • Trigger point: Processing a StreamSQL query containing a specially constructed double-quoted column name that reaches an aggregate expression
  • Why exploitation is possible: User-controlled identifier text is interpolated into generated Java source before Janino compiles it, allowing source-level code injection within the Yamcs server process

Why this happens

The underlying bug is improper neutralization of user-controlled identifiers during dynamic source-code generation. StreamSQL column names are incorporated into Java source by expression code-generation logic, while sanitization does not reliably preserve the boundary between data and executable source.

This behavior maps to CWE-94: Improper Control of Generation of Code, because externally influenced input can alter dynamically generated code that is subsequently compiled and executed.

Potential impact

  • An attacker may execute arbitrary Java code in the Yamcs server process.
  • Sensitive mission data, credentials, or configuration secrets could be exposed.
  • Telemetry or other operational data could be altered or poisoned.
  • Mission-control services could experience denial of service.
  • The compromise could enable further access to connected systems, depending on server privileges and network exposure.

General mitigation guidance

Mitigation generally focuses on preventing untrusted input from entering generated source code and reducing the privileges available to query-processing components.

Common defensive patterns include:

  • Avoiding runtime compilation of source code derived from user-controlled identifiers.
  • Representing expressions with a constrained internal syntax tree or fixed operation mapping instead of string interpolation.
  • Applying strict allowlisting and context-aware encoding to identifiers before any code-generation step.
  • Separating query parsing from execution and enforcing authorization at every query entry point.
  • Running Yamcs services with least-privilege operating-system, database, filesystem, and network permissions.
  • Restricting archive SQL execution to trusted administrative workflows and isolating mission-control components where practical.
  • Treating generated code and dynamic compilation as high-risk capabilities subject to dedicated security review.

How teams detect issues like this

Detection can combine source review, runtime monitoring, and policy enforcement:

  • Use static analysis rules to identify string concatenation or interpolation of request-controlled values into Java source or compiler inputs.
  • Review identifier sanitization functions for context confusion, incomplete allowlists, and transformations that do not guarantee valid non-executable identifiers.
  • Search for dynamic compiler calls, including Janino compilation, on paths reachable from API or query inputs.
  • Add security tests covering quoted identifiers, aggregate expressions, and other parser boundaries.
  • Monitor archive SQL API activity for unusual query patterns, unexpected compilation errors, and requests from accounts not normally performing archival operations.
  • Enforce policies requiring security review for dynamic code generation and for privileged query-execution endpoints.
  • Automated code-review and software-composition tools may help identify unsafe source-generation and compiler usage patterns.

Sources

SourceLink
github.comgithub.com/yamcs/yamcs/commit/8c1070b12c0a6c003903325cb2a1013347e2dbde
github.comgithub.com/yamcs/yamcs/commit/b65a3d78178ba99a58b753feda6ecc3b5a694f13
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-3g44-3m7x-cgg2

Frequently asked

questions

It can be exploitable through the Yamcs archive SQL API when that endpoint is reachable and the attacker has the required authenticated privilege. It is not generally an unauthenticated issue.

Exploitation requires a user or service account with SystemPrivilege.ControlArchiving, along with access to submit SQL through the affected API path.

The safest pattern is to eliminate compilation of source assembled from user-controlled text. Where dynamic execution is unavoidable, use a constrained intermediate representation, strict identifier allowlists, and strong authorization controls.

Treat query input as data throughout parsing and execution, test parser and code-generation boundaries, restrict dynamic compiler capabilities, and run mission-control services with minimal privileges.

Find out what's already
exploitable in your codebase.