Описание
Yamcs's Missing Authorization on Role and Privilege Enumeration Endpoints Allows Any Authenticated User to Disclose Full Security Configuration
Summary
Missing authorization checks on three IAM API endpoints (GET /api/roles, GET /api/roles/{name}, GET /api/privileges) allow any authenticated user — regardless of their assigned permissions — to enumerate the complete list of system privileges and role definitions. An attacker with only a low-privilege account (e.g., a read-only operator) can retrieve the full privilege taxonomy of the server, including the names and assignments of all administrator-level capabilities. This information directly enables targeted privilege escalation attacks.
Details
Three handler methods in IamApi.java serve sensitive security metadata without performing any authorization check:
File: yamcs-core/src/main/java/org/yamcs/http/api/IamApi.java
By contrast, all write operations and user-management endpoints in the same file correctly enforce authorization. For example:
The three vulnerable endpoints share the same ControlAccess protection requirement as the user-management endpoints but were never given the corresponding check.
Route definitions (confirmed in yamcs-api/src/main/proto/yamcs/protobuf/iam/iam.proto):
PoC
Environment
- Yamcs version: 5.13.1-SNAPSHOT (latest master)
- Auth module: YamlAuthModule (default)
- Two accounts available:
admin(Administrator) andoperator(Operator) - Calculate the Basic Auth credentials for the two accounts (this needs to be done only once). Please modify according to the actual situation. These credentials will be used in subsequent commands. Here, there is a test low-privilege account named "operator" with the password "password".
powershell -command "[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes('admin:admin'))"
powershell -command "[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes('operator:password'))"
Step 1 — Confirm that protected endpoints correctly return 403 for low-privilege users
Expected: HTTP 403 — the user-list endpoint enforces ControlAccess.
Step 2 — Enumerate all system privileges with the operator account
Actual response (HTTP 200):
The operator account receives the server's complete privilege taxonomy — all 31 system privileges including ControlAccess (full user management) and ChangeMissionDatabase (algorithm-level RCE, see related advisory).
Step 3 — Enumerate all defined roles with the operator account
Actual response (HTTP 200):
The endpoint returns HTTP 200 (no authorization check triggered). The empty body reflects the test environment: the YamlAuthModule stores role names as plain strings in users.yaml and does not persist Role objects into the security store's Directory. In any Yamcs instance where roles have been created through the REST API (POST /api/roles), this endpoint returns the full role-to-privilege mapping for every defined role.
Step 4 — Attempt to read a specific role by name
Actual response:
The 404 is a business-logic outcome (the role object does not exist in the Directory for this test configuration), not an authorization rejection. The server never checked whether the caller is permitted to read role data — it proceeded to the lookup and returned the lookup result. In a deployment where roles are registered as objects, this endpoint returns their full privilege configuration to any authenticated user.
Observed vs Expected
| Request | Expected | Actual | Note |
|---|---|---|---|
GET /api/users (operator) | 403 | 403 ✓ | Auth check present |
GET /api/privileges (operator) | 403 | 200 ✗ | Confirmed — full privilege list leaked |
GET /api/roles (operator) | 403 | 200 ✗ | Auth check absent; empty only in this test setup |
GET /api/roles/Administrator (operator) | 403 | 404 ✗ | No auth check; 404 = role not in Directory, not access denied |
Impact
Vulnerability type: Broken Function Level Authorization (BFLA) / Missing Authorization (OWASP API Security Top 10 2023: API5)
Who is impacted:
Any deployment of Yamcs that has authentication enabled (the default for production setups) and has more than one user tier. This includes the vast majority of operational Yamcs installations in ground station, satellite operations, and mission control contexts.
Direct impact:
- Any authenticated user, including operators, guest accounts, or service accounts with minimal privileges, can retrieve the server's complete privilege taxonomy and all role-to-privilege mappings.
Chained impact:
The disclosed privilege names and role definitions provide an attacker with a precise roadmap for privilege escalation:
- Identify which privilege grants the capability they need (e.g.,
ChangeMissionDatabasefor RCE via the algorithm engine,ControlAccessfor full user management). - Identify which roles carry that privilege.
- Target the accounts that hold those roles for credential theft, session hijacking, or social engineering.
In mission-critical environments (spacecraft operations, industrial control), unauthorized privilege escalation via this information leak could have safety implications beyond IT security.
Fix
Add ctx.checkSystemPrivilege(SystemPrivilege.ControlAccess) as the first statement in each of the three affected methods, matching the pattern already used by adjacent endpoints in the same file:
Ссылки
- https://github.com/yamcs/yamcs/security/advisories/GHSA-cvw4-55pp-3hfq
- https://github.com/yamcs/yamcs/commit/c2aec1c242e656e48b52c7f87deea88183bb592d
- https://github.com/yamcs/yamcs/commit/dcaec5f0b2f4231b8e313e94d79a937169c9e0ba
- https://github.com/yamcs/yamcs/releases/tag/yamcs-5.12.8
- https://github.com/yamcs/yamcs/releases/tag/yamcs-5.13.2
Пакеты
org.yamcs:yamcs-core
>= 5.13.0, <= 5.13.1
5.13.2
org.yamcs:yamcs-core
<= 5.12.7
5.12.8
Связанные уязвимости
Yamcs is a mission control framework. Prior to 5.12.8 and 5.13.2, Yamcs omits SystemPrivilege.ControlAccess checks from IamApi.listRoles, IamApi.getRole, and IamApi.listPrivileges in yamcs-core/src/main/java/org/yamcs/http/api/IamApi.java. Any authenticated account can call GET /api/roles, GET /api/roles/{name}, and GET /api/privileges to enumerate available system privileges and configured role mappings. The disclosure reveals security configuration that can support targeted privilege-escalation attempts. This issue is fixed in versions 5.12.8 and 5.13.2.