CVE-2026-137019 — Privasys Enclave-os-mini-wasm — CWE-20 · CWE-269
Enclave OS Mini is a Rust-based runtime for confidential applications inside Intel SGX enclaves. Prior to enclave-os-mini-wasm version 0.53.0 and enclave-cluster version 0.8.0, Enclave OS Mini accepted a caller-chosen user_handle during FIDO2 registration and interpolated it through user_key into the application role-store namespace without validation. A handle naming the reserved manifest control key could overwrite the manifest with a valid JSON default-roles array, empty the user manifest, and cause get_user_roles_with_bootstrap to treat a later registration as the first user and grant the admin role. The issue affects applications that combine FIDO2 self-registration with app-auth roles and accept client-chosen handles, and its scope is limited to the affected application's role assignments. This issue is fixed in enclave-os-mini-wasm version 0.53.0 and enclave-cluster version 0.8.0.
Enclave OS Mini is a Rust-based runtime for confidential applications inside Intel SGX enclaves. Prior to enclave-os-mini-wasm version 0.53.0 and enclave-cluster version 0.8.0, Enclave OS Mini accepted a caller-chosen user_handle during FIDO2 registration and interpolated it through user_key into the application role-store namespace without validation. A handle naming the reserved manifest control key could overwrite the manifest with a valid JSON default-roles array, empty the user manifest, and cause get_user_roles_with_bootstrap to treat a later registration as the first user and grant the admin role. The issue affects applications that combine FIDO2 self-registration with app-auth roles and accept client-chosen handles, and its scope is limited to the affected application's role assignments. This issue is fixed in enclave-os-mini-wasm version 0.53.0 and enclave-cluster version 0.8.0.
🎯 What is this vulnerability?
Root cause
Enclave OS Mini is a Rust‑based runtime that runs confidential applications inside Intel SGX enclaves.
During a FIDO2 self‑registration flow the client supplies a caller‑chosen user_handle.
The runtime takes that string, interpolates it into the user_key that is used to address the
application’s role‑store namespace, and stores the registration data there without any validation.
A special, reserved key is used internally by Enclave OS Mini to hold the application manifest
(manifest_control_key). If an attacker supplies a user_handle that matches this reserved key,
the runtime will write the registration payload under that key.
The payload contains a valid JSON default‑roles array (e.g., ["admin"]).
Consequences:
1. The manifest is overwritten with a minimal, empty user manifest.
2. The next registration is treated as the first user by get_user_roles_with_bootstrap.
3. That first user automatically receives the admin role.
Thus the flaw is a classic insecure input handling / lack of validation (CWE‑20) combined
with privilege escalation via role manipulation (CWE‑269).
The vulnerability is remote, low‑complexity, no authentication required, no user interaction,
and it only affects the role assignments of the affected application.
⚡ Attack Chain
NOTE: The exact URI and parameter names are not specified in the CVE description.
The following example uses a plausible endpoint (/fido2/register) and JSON payload
to illustrate the attack class. Replace with the real endpoint/parameters if they differ.
1. Discovery & Reconnaissance
| Step | Technique | What to look for |
|---|---|---|
| Service fingerprinting | HTTP header analysis, TLS SNI, or curl -I https://<target> | Look for Server: Enclave-OS-Mini or custom headers like X-OS-Mini-Version: 0.52.1. |
| Version enumeration | curl -X GET https://<target>/health or /version | Many SGX runtimes expose a /version endpoint that returns JSON: {"version":"0.52.1"}. |
| Endpoint discovery | Automated spidering or manual testing of common paths (/fido2, /auth, /register) | Identify the FIDO2 registration endpoint. |
| Input validation check | Send malformed user_handle values (e.g., ../.., \0, very long strings) | Observe if the service accepts them or rejects them. |
2. Exploitation
Goal: Create a registration that writes to the reserved manifest key and injects an admin role.
| Step | Action | Example |
|---|---|---|
| Craft payload | Set user_handle to the reserved key (e.g., "__manifest__"). | user_handle: "__manifest__" |
| Include admin role | In the registration payload, include a default_roles array with "admin". | default_roles: ["admin"] |
| Send request | POST to the FIDO2 registration endpoint. | curl -X POST https://<target>/fido2/register -H "Content-Type: application/json" -d '{"user_handle":"__manifest__","default_roles":["admin"]}' |
Illustrative example (the real endpoint may differ):
curl -X POST https://example.com/fido2/register \
-H "Content-Type: application/json" \
-d '{
"user_handle":"__manifest__",
"default_roles":["admin"],
"fido2_challenge":"<base64‑encoded‑challenge>"
}'What happens inside the runtime
1. The runtime receives the JSON, extracts user_handle.
2. It interpolates it into the role‑store key: role_store["__manifest__"].
3. Because no validation occurs, it writes the supplied payload to that key.
4. The manifest now contains a minimal JSON array ["admin"] and an empty user manifest.
5. The next real user registration is treated as the first user by get_user_roles_with_bootstrap.
6. That user receives the admin role automatically.
3. Post‑exploitation
| Step | Capability | How it is achieved |
|---|---|---|
| Privilege escalation | Gain admin rights in the enclave application | The attacker’s next registration becomes the first user → admin role |
| Read/write manifest | Access to confidential configuration or secrets stored in the manifest | Admin role allows reading/writing the manifest namespace |
| Execute privileged actions | Depending on the application, this could be reading enclave memory, triggering privileged APIs, or modifying role assignments for other users | Admin role typically grants full control over the application’s role store |
| Persistence | Create additional admin users or modify existing roles | Use the same registration flow to add more users with "admin" role |
🌍 Real World Impact
| Impact | CVSS Vector | Explanation |
|---|---|---|
| Confidentiality | C:H | The attacker can read the manifest, which may contain secrets or configuration that grants access to confidential data. |
| Integrity | I:H | The attacker can overwrite the manifest, delete user manifests, or inject arbitrary roles, corrupting the application’s state. |
| Availability | A:N | No direct denial‑of‑service effect, but a corrupted manifest could render the application unusable. |
Practical consequences
- An attacker can gain admin privileges without any authentication or user interaction.
- Once admin, the attacker can read, modify, or delete any data stored in the enclave’s role store or manifest.
- In multi‑tenant deployments, a compromised tenant could affect other tenants if the role store is shared.
- The vulnerability is scope‑limited to the affected application’s role assignments; it does not grant arbitrary code execution inside the enclave.
🛡️ Remediation & Mitigation
Exact affected versions
| Component | Affected versions | Fixed in |
|---|---|---|
enclave-os-mini-wasm | < 0.53.0 | 0.53.0 |
enclave-cluster | < 0.8.0 | 0.8.0 |
Upgrade recommendation
Immediately upgrade to enclave-os-mini-wasm 0.53.0 or enclave-cluster 0.8.0.
These releases add validation for user_handle and reject reserved key names.
Workarounds
1. Input validation – If you cannot upgrade immediately, patch the registration handler to reject any user_handle that matches the reserved manifest key ("__manifest__" or whatever the implementation uses).
if user_handle == "__manifest__" {
return Err("Invalid user_handle");
}2. Disable FIDO2 registration – If the application does not require self‑registration, block the endpoint entirely (e.g., via firewall or WAF rule).
3. Restrict access – Limit the registration endpoint to internal IP ranges or authenticated service accounts.
4. WAF/ModSecurity rule – Block requests where the JSON body contains user_handle":"__manifest__".
SecRule REQUEST_BODY "@contains \"user_handle\":\"__manifest__\"" \
"id:1001,phase:2,deny,status:400,msg:'Reserved user_handle used'"Detection
| Indicator | Log pattern | How to spot it |
|---|---|---|
| Unexpected role‑store write | role_store_write: key="__manifest__", value=... | Look for writes to the reserved key. |
| Repeated FIDO2 registrations | fido2_register: user_handle="__manifest__" | Multiple attempts to use the reserved key. |
| Privilege escalation | user_role_change: user=..., new_role=admin | A user gaining admin without prior admin rights. |
| Manifest corruption | manifest_updated: status=success, content=... | Manifest content deviates from expected schema. |
IoCs
__manifest__ appearing in request bodies or logs. default_roles:["admin"] during registration. ⚠️ Urgency
| Metric | Value | Interpretation |
|---|---|---|
| CVSS v3.1 | 9.1 | Critical severity |
| Attack complexity | Low | Requires only a crafted HTTP request |
| Privileges required | None | No prior authentication |
| User interaction | None | Fully automated |
| Scope | Unchanged | Only the affected application |
Patch priority: Immediate.
Given the critical CVSS score, zero‑interaction exploitation, and the ability to grant admin rights, the vulnerability poses a high risk to any environment running the affected Enclave OS Mini versions. Deploy the fixed releases or apply the workarounds as soon as possible.
[🤖 CVE Professor AI Security Engine]
FOFA Query