🎯 CVE-2026-55511 深度技术分析:漏洞根因 · PoC/EXP · 检测指纹

🎯 CVE 全聚合深度分析

CVE-2026-55511 深度技术分析

📊 聚合 3 来源🧪 含 PoC
NVD-LatestGitHub-AdvisoryPoC-in-GitHub

摘要:CVE-2026-55511 是 Yamcs 任务控制框架中的一个严重远程代码执行漏洞,CVSS 评分为 9.1,属于未经身份验证即可触发的任意 Java 代码执行缺陷。其根因在于 Yamcs 使用 Janino SimpleCompiler 将 StreamSQL 表达式动态编译为 Java 源码,而未对双引号标识符中的特殊字符进行过滤,导致具有 SystemPrivilege.ControlArchiving 权限的用户可通过构造恶意列名,在 POST /api/archive/{instance}:executeSql 接口的聚合查询编译过程中注入任意 Java 代码,最终在 Yamcs 服务器进程中实现远程代码执行。官方在 5.12.8 和 5.13.2 版本中修复该问题。

📌 漏洞概述

  • CVE 编号:CVE-2026-55511
  • 安全公告:GHSA-3g44-3m7x-cgg2
  • CVSS 评分:9.1(Critical)
  • 影响组件:Maven 组件 org.yamcs:yamcs-core
  • 影响版本:5.12.8 之前,以及 5.13.2 之前(包括 5.13.0、5.13.1)
  • 固定版本:5.12.8、5.13.2
  • 漏洞类型:不安全的动态代码编译 / 表达式注入导致的远程代码执行(RCE)
  • 利用前置条件:需要拥有 SystemPrivilege.ControlArchiving 系统权限,并且能够访问 Yamcs 的 SQL 执行 API。

该漏洞是继 CVE-2026-44632(GHSA-524g-x36v-9wm6)之后暴露出的另一个独立 Janino RCE 入口。CVE-2026-44632 的修复只加固了 JavaExprAlgorithmExecutionFactory 所对应的算法覆盖路径,而 StreamSQL 表达式编译器 org.yamcs.yarch.streamsql 未被覆盖,因此仍然可以被利用。

🔬 漏洞根因分析

Yamcs 在运行时会将 StreamSQL 语句动态编译为 Java 源码,并使用 Janino SimpleCompiler.cook() 完成内存编译与加载。这一机制本身没有采用限制性的类加载策略,也没有表达式沙箱,因此一旦生成代码中混入了攻击者可控的 Java 语法片段,就等同于直接执行任意 Java 代码。

漏洞的具体触发路径如下:

  • 首先,Yamcs 允许列名使用双引号包裹的标识符,且原始词法规则为 < S_DOUBLE_QUOTED_IDENTIFIER: "\"" (~["\n","\r","\""])* "\"" >,这意味着只要不包含换行、回车和双引号,任意字符都可以出现在双引号列名中。
  • 当用户构造类似 SELECT sum("恶意列名") FROM ... 的 StreamSQL 查询时,该列名会经过 Expression.fillCode_InputDefVarsExpression.sanitizeName 处理,随后被未加转义地拼接到生成的 Java 源代码中。
  • 聚合表达式 sum(...) 最终会进入 CompilableAggregateExpressionSumExpression,并通过 SelectExpression.compile 调用 Janino SimpleCompiler.cook 编译包含攻击者注入内容的 Java 源码。
  • 攻击者在列名中注入 Java 语句片段所需的特殊字符——如空格、分号、括号、花括号、逗号、等号等——即可闭合原有表达式结构并插入恶意代码,最终在 Yamcs 服务器进程中执行任意 Java 代码。

这个问题的本质是“可信编译边界”的缺失:Yamcs 将用户可控的列名直接视为可信的 Java 代码片段,而没有经过任何语法白名单或转义处理。sanitizeName 一类的方法并没有针对注入字符做拦截,因此形同虚设。由于 Janino SimpleCompiler 默认允许访问 Java 标准库和当前 classpath 中的类,攻击者可以调用 java.lang.Runtimejava.lang.ProcessBuilder 等类实现任意命令执行,甚至进一步加载恶意类。

与 CVE-2026-44632 相比,该漏洞的入口不同:CVE-2026-44632 通过 MDB 覆盖接口 MdbOverrideApi 触发,并且受 ChangeMissionDatabase 权限限制;而 CVE-2026-55511 则通过 StreamSQL 的聚合表达式编译路径触发,仅需要 ControlArchiving 权限。官方在 5.13.0 / 5.12.7 版本中只修复了前者,未处理 StreamSQL 编译器,因此 5.13.0 版本仍然存在此漏洞。

💥 影响与危害

  • 远程代码执行:攻击者可以在 Yamcs 服务器进程中执行任意 Java 代码,完全控制 Yamcs 服务。
  • 敏感数据泄露:Yamcs 是任务控制框架,通常处理航天器遥测、指令、任务数据库和各类关键任务数据。攻击者可读取数据库凭据、云服务密钥、任务敏感配置以及历史遥测数据。
  • 遥测数据篡改:攻击者可以直接修改内存中的数据或底层存储,伪造遥测值、篡改指令序列,破坏任务数据的完整性。
  • 拒绝服务:攻击者可以执行 System.exit()、耗尽资源或破坏核心服务进程,导致 Yamcs 系统不可用,进而影响任务运行。
  • 内网横向移动:由于 Yamcs 通常运行在任务控制网络内部,攻击者一旦获得服务器权限,可利用该位置进一步探测内网、攻击数据库和其他运维系统。

该漏洞目前未被 CISA KEV(Known Exploited Vulnerabilities)目录收录,也没有公开的完整 EXP 直接发布,但漏洞的技术细节和补丁分析已经公开,攻击者可以基于提交差异迅速构造有效利用载荷,风险极高。

🛡️ 修复与缓解

  • 升级修复版本:5.12.x 分支应升级到 5.12.8;5.13.x 分支应升级到 5.13.2
  • 官方补丁:两个分支的修复提交分别为:
    • Mainline / 5.13.x:b65a3d78178ba99a58b753feda6ecc3b5a694f13
    • 5.12.x:8c1070b12c0a6c003903325cb2a1013347e2dbde
  • 补丁内容:核心修改位于 StreamSql.jj,将双引号标识符的词法规则从“除换行/回车/双引号外任意字符”改为白名单限制,只允许 ASCII 字母、数字、$_#.,并且要求至少一个字符。该限制直接阻断了通过列名注入空格、分号、括号、花括号等 Java 语法字符的可能。
  • 权限收敛:在无法立即升级的环境中,应严格限制 SystemPrivilege.ControlArchiving 角色的授予范围,仅允许可信管理员使用,并避免将该权限授予普通操作人员或外部用户。
  • 网络访问控制:限制对 POST /api/archive/{instance}:executeSql 接口的网络访问,只允许来自受信任管理网段的请求,并启用 TLS + 认证以降低被攻击者调用的概率。
  • 监控与审计:在系统日志中重点关注含有异常双引号标识符的 StreamSQL 查询、executeSql 调用记录以及 Yamcs 进程的异常子进程 / Java 动态编译行为,以便及时发现利用尝试。

总体上,CVE-2026-55511 是一个典型的“不安全动态编译”导致的 RCE 漏洞。由于 Yamcs 在任务控制场景中的核心地位,任何可执行任意 Java 代码的漏洞都应当被视作最高优先级的安全事件处理。建议所有受影响版本的用户尽快升级至修复版本,并在升级前通过权限收敛和网络隔离降低暴露风险。

🧪 PoC 复现

从 GitHub 公开仓库抓取的实际 PoC 代码(仓库)。

📋 代码元数据语言md来源junfuture1103/CVE-2026-55511针对性✅ 已验证与漏洞相关(代码含 CVE 引用)依赖见代码注释/README用法详见代码注释中的使用说明

# CVE-2026-55511 Patch Analysis

## Official Fix Commits

The Yamcs project applied equivalent fixes to its active release lines:

|Branch |Commit |First fixed release ||--- |--- |--- ||Mainline / 5.13.x |[`b65a3d78178ba99a58b753feda6ecc3b5a694f13`](https://github.com/yamcs/yamcs/commit/b65a3d78178ba99a58b753feda6ecc3b5a694f13) |5.13.2 ||5.12.x |
[`8c1070b12c0a6c003903325cb2a1013347e2dbde`](https://github.com/yamcs/yamcs/commit/8c1070b12c0a6c003903325cb2a1013347e2dbde) |5.12.8 |Both commits are titled `Avoid RCE through double-quoted identifiers` and reference CVE-2026-55511 / GHSA-3g44-3m7x-cgg2.

## What Changed

The security-relevant change is in `StreamSql.jj`. Before the patch,
a double-quoted identifier accepted any character other than CR,LF,or `"`:

```java
<S_DOUBLE_QUOTED_IDENTIFIER: "\"" (~["\n","\r","\""])* "\"" >```

The patch replaces this broad rule with an allowlist:

```java
<S_DOUBLE_QUOTED_IDENTIFIER: "\"" (<LETTER>|<DIGIT>|<SPECIAL_CHARS>)+ "\"" >```

The permitted characters are ASCII letters,digits,`$`,`_`,`#`,
and `.`. The `+` also requires at least one character,so an empty quoted identifier is no longer accepted.

The commits also contain:

- regenerated `StreamSqlParser.java` and `StreamSqlParserTokenManager.java` output;- matching documentation changes for the object-name grammar;
and
- a test adjustment that uses a single-quoted SQL string value instead of a double-quoted identifier containing a space.

Most of the commit's line count comes from regenerated parser files. The one-line grammar restriction in `StreamSql.jj` is the core security change.

## Why the Patch Blocks the Exploit

The vulnerable path depended on placing Java syntax in a quoted column name. Statement injection requires characters such as whitespace,
`;`,`(`,`)`,`=`,braces,or commas. The patched lexer rejects those characters before a column definition can be created or later referenced by StreamSQL.

As a result,
attacker-controlled quoted identifiers can no longer terminate or reshape the generated `col<name>` Java identifier. Only characters that remain within the parser's restricted object-name alphabet reach the aggregate code generator.

## Compatibility Impact

The fix intentionally narrows valid double-quoted object names. Existing SQL or schemas that rely on spaces or punctuation outside `$`,
`_`,`#`,and `.` may fail to parse after upgrading. Operators should review stored schema definitions,automation,and client-generated StreamSQL before rollout.

Valid examples after the patch include:

```text
"column_1"
"ops.metric"
"$internal#value"
```

Names containing spaces,semicolons,parentheses,commas,
or other non-allowlisted punctuation are rejected.

## Scope and Defense in Depth

The upstream patch closes the demonstrated entry point at the StreamSQL parser boundary. It does not remove Janino compilation,replace real column names with synthetic Java identifiers,or add a restrictive Janino class-loading policy.

For additional hardening,
generated code should avoid using source-level names derived from user-controlled identifiers. A robust design would assign synthetic variables such as `col0`,`col1`,and escape the real column name only when it is used as a Java string value. Restricting dangerous JDK API access during dynamic compilation would provide another layer of defense.

These are defense-in-depth observations,
not claims that the official fixed releases remain exploitable through the reported payload.

## Verification Guidance

After upgrading or backporting the fix:

1. Confirm the running Yamcs version is 5.13.2,5.12.8,
or later.
2. Confirm a double-quoted identifier containing a semicolon or whitespace is rejected during parsing.
3. Confirm ordinary identifiers and allowlisted quoted identifiers continue to work.
4. Run the Yamcs StreamSQL and Yarch test suites after any manual backport.
5. Review accounts holding `ControlArchiving` and remove unnecessary grants.

Prefer upgrading to an official fixed release over copying only generated parser files. If a backport is required,
apply the grammar source change together with regenerated parser output,documentation,and tests.

⚔️ EXP 利用代码

截至分析时,Exploit-DB 未收录该 CVE 的公开利用代码。可利用上述 PoC 进行验证,或关注 Exploit-DB 更新。

🕵️ 检测指纹

当前规则库未收录针对该 CVE 的专用检测规则。建议:

  • 根据漏洞根因编写 Nuclei 检测模板
  • 在 WAF/IDS 中配置针对漏洞特征的规则
  • 关注漏洞指纹库更新

🤖 本文由漏洞情报系统自动聚合生成 · 2026-08-31 01:07 · 数据源: NVD/GitHub-Advisory/OSV/CISA-KEV/Exploit-DB/PoC-in-GitHub + 检测规则库

[!] CONTACT_CHANNELS

如需商务合作、技术咨询或漏洞反馈,请通过以下离岸节点联系作者。

> PING_AUTHOR (@A1RedTeam)