Phala Network & dstack: KMS root-key theft, the Shadow-CVM blind spot, and live on-chain governance
In late November 2026, following a five-month canary-token study led by
HD Moore (Chief Research Officer at Dragos;
AI Supply Chain Security: What Canary Tokens Found,
~2 million prompts seeded with unique trackable AWS credentials and URLs), OpenRouter confirmed no breach of its
own platform, off-boarded three inference providers, removed 125 endpoints from Zero Data Retention (ZDR)
eligibility as a precaution, notified affected users, and began integrating Dragos's canary testing into ongoing
checks. Phala Network published an unusually candid
detailed incident report (23 November 2026)
confirming two separate breaches by the same attacker on Phala's infrastructure: 152,092 DeepSeek V4 Flash 0731
requests exposed through an unattested experimental backend (21 October – 1 November), followed by seven
unauthorized handovers of Phala Cloud's legacy KMS root key on 5 November affecting 2,169 applications.
As Phala put it: “The TEE hardware worked as designed. We didn't.” This case study examines the
exact failure chains, why decoupling a persistent KMS creates an unattested Shadow-CVM key-extraction path,
and what live Ethereum and Base RPC queries show about DstackKms governance on 1 December 2026.
Executive Summary — Key Verified Facts & Architectural Lessons:
- Two Distinct Breaches Without a Hardware TEE Exploit: An attacker pivoted from a default-password Grafana CVM over QEMU SLIRP (
10.0.2.2) to an unauthenticated host VMM onGPU3, persisting a rootkit that read152,092DeepSeek V4 Flash 0731 requests on Phala's server for 11 days undetected; two weeks later, the same actor hitGPU1/GPU2and pulled Phala Cloud's legacy KMS root key 7 times because the replica allowlist check was turned off (timeline). - Permanent Key Compromise for
509Apps UsinggetKey(): Because the legacy KMS root key was shared across 19 replicas and deterministically derives app keys, rotating the root key on 6 November does not revoke the attacker's copy—509of2,169affected Phala Cloud apps must manually migrate wallets, signing keys, and encrypted secrets (scope). - The “Shadow-CVM” Blind Spot of Decoupled KMS Architectures: Remote attestation only proves what the user-facing CVM runs—it cannot prove what other VMs or KMS replicas the KMS policy authorized in the background. Any party that controls or compromises the KMS release policy can spin up a hidden shadow CVM/replica to pull the exact same deterministic keys out-of-band while the production CVM's attestation stays 100% clean (diagram & proof).
- Live On-Chain Audit of
DstackKms.sol(Verified 1 December 2026): Even on Phala's unaffected on-chain KMS,DstackKmsisUUPSUpgradeablewithonlyOwnerauthority over measurement allowlists, OS images, and contract upgrades. Live RPC checks on both Ethereum (block26,533,173) and Base (block64,562,593) confirmowner()is still0x3926658a072f82baea5e5a15e1fed8a776f4a663—a plain2-of-3Gnosis Safe with0modules,0x0guard, and zero timelock, 9 days after co-founder Hang Yin acknowledged the gap (live RPC table). $0.00Live Audit of Rebuiltinference.phala.com&private-ai-gateway(1 December 2026): Without creating a credit-card account (ironically, Phala's API billing does not accept anonymous crypto payments), public attestation, Base RPC, and source-code inspection show: (1) all live E2EE, receipt, and TLS keys are still deterministically derived fromdstack-kmsunder a live BaseDstackAppproxy whose 2-of-3 Safe can upgrade or add compose hashes with zero timelock; (2)18 / 34(52.9%) listedis_tee: truemodels have zero Phala backends (9 Chutes-only, 4 NEAR AI-only, 3 Tinfoil-only); (3) defaultpapCLI/Desktop passesVERIFIEDfor any dstack TDX CVM (id-5KMS custody isSKIP, accepted compose/KMS lists empty); (4) runtime NVIDIA NRAS checks are non-fatal onphala-direct/chutes(andphala-directsetsverify_signature: Falseon NRAS JWTs); and (5) a defaultprefix_hashsent to the external control plane omitsuser_id, creating a cross-tenant prompt-equality oracle (full audit).- Why Stateless LLM Inference Needs Zero Persistent KMS: Client-verified hardware attestation + per-request ephemeral E2EE directly to a RAM-only enclave key (with zero persistent KMS and zero router plaintext) eliminates both failure modes at the protocol layer—demonstrated live in our AMD SEV-SNP E2EE demo (comparison).
- 1. Two separate breaches, zero TEE hardware exploits (timeline & kill chains)
- 2. The architectural trap: decoupled KMS & the “Shadow-CVM” blind spot
- 3. Live on-chain audit of
DstackKms.solon Ethereum & Base (1 December 2026) - 4. Live
$0.00audit of rebuiltinference.phala.com&private-ai-gateway(1 December 2026) - 5. The standard-API router boundary: why direct client E2EE matters
- 6. Decoupled KMS vs. Zero-KMS ephemeral E2EE (architecture comparison)
- 7. Honest credit, Phala's fixes, and audit boundaries
DeepSeek V4 Flash 0731 requests at risk on Phala's GPU3 (21 Oct – 1 Nov; 0.45% of Phala's 33.59M window requests), uncovered by HD Moore / Dragos canary keys2,169 apps (509 using getKey() must manually migrate secrets permanently)DstackKms proxy owner on both Ethereum & Base (1 Dec 2026): unguarded Gnosis Safe (guard = 0x0, 0 modules, zero timelock)GPU3 server (21 Oct – 1 Nov) while Phala's gateway skipped attestation checks—caught only by external Dragos canary testing1. Two separate breaches, zero TEE hardware exploits
Following the five-month canary-token investigation led by HD Moore at Dragos
(AI Supply Chain Security: What
Canary Tokens Found, seeding ~2 million prompts with unique monitored AWS keys and URLs), OpenRouter
confirmed that its own infrastructure was not breached and acted rapidly—off-boarding three third-party providers,
removing 125 endpoints from ZDR eligibility, notifying affected users, and building Dragos's canary testing
into ongoing checks (linking public notices from Atlas Cloud, GMI Cloud, Phala, and Together). In its
23 November 2026 detailed report
(superseding its 10 November preliminary notice), Phala confirmed that one external actor executed two distinct
compromises across three Phala hosts (GPU3 in October, GPU1 and GPU2 in
November), attributed via the same third-party Ed25519 SSH key and identical SLIRP-to-VMM methods:
Two details in Phala's own timeline deserve special attention because they dismantle a common misconception about confidential computing:
- The first root-key handover did not even require host compromise. At
09:10:24 UTCon 5 November, the legacy KMS replica onGPU1handed its master root key over the public internet to an attacker-controlled caller—followed by six more handovers over loopback between14:41and14:55 UTC—solely because the legacy KMS replica policy checked only that the caller ran a known OS image, not its compose hash, measurement, or device identity. - Rotating a compromised deterministic KMS root key cannot un-steal derived keys. Phala deployed a new
KMS cluster with a fresh root key on 6 November (
05:02 UTC) and used key epochs (dstack PR #1574) to re-encrypt ENV and disks for2,179 / 2,271affected CVMs by 21 November. But as Phala states plainly in its guidance: “The attacker holds a copy of the old PHALA root key. They can derive anything derived from it, indefinitely. Migration does not revoke that copy.” Every application among the509apps that usedgetKey()for wallets, signing, authorization, or external encryption had to manually rotate everything those keys protect.
2. The architectural trap: decoupled KMS & the “Shadow-CVM” blind spot
During the 22 November X debate following
OpenRouter's announcement, a former Phala contributor (@hashwarlock) initially argued that Phala
engineers could not access user keys without “an undisclosed exploit during bootstrap process,”
and defended dstack's separation of the KMS policy from the TEE as pragmatic engineering. Phala
co-founder Hang Yin (@bgmshana) candidly clarified the real boundary:
That final claim—that a silent policy bypass would be “immediately caught by a remote attestation”—exposes a subtle, fundamental blind spot in decoupled-KMS TEE architectures: the Shadow-CVM attack.
Remote attestation is a point-to-point proof: it proves what code and configuration are running inside the specific CVM the user connects to. It proves nothing about what other VMs or KMS replicas the KMS authorization policy approved in the background:
In the same X thread, Hang Yin countered with two points: (1) a developer can bypass the KMS entirely, and (2) even if the KMS is compromised, an attacker still needs access to ciphertext such as a TLS dump. Neither refutes the threat model:
- Saying the attack fails “if the developer bypasses the KMS entirely” confirms that it
does apply to every CVM relying on
dstack-kmsfor encrypted disks, sealed environment secrets, or deterministicgetKey()credentials. - Under the TEE threat model (untrusted or compromised bare-metal host), the host already possesses every
CVM's encrypted LUKS disk, sealed
.envblobs, and network captures—exactly as Phala's own 23 November report confirms (“With control of GPU1's VMM, the attacker could read the encrypted environment of every CVM on the host”). And for KMS-derived wallet or API keys (getKey()), the derived key is the secret—no ciphertext is needed at all.
Crucially, this is not merely theoretical: the 5 November breach on GPU1 was a live instance of this
exact pattern—an unauthorized caller satisfied an overly permissive KMS policy to pull the gateway key and the
legacy root key without ever touching the legitimate production workloads' attestations.
3. Live on-chain audit of DstackKms.sol on Ethereum & Base (1 December 2026)
Phala's incident report and co-founder replies correctly emphasize that the on-chain KMS was not affected by the 5 November Cloud KMS policy bug and gives users a public audit trail. That raises the decisive governance question: who controls the on-chain KMS policy contract, and can they approve a new KMS measurement or upgrade the contract instantaneously?
Inspecting
dstack/kms/auth-eth/contracts/DstackKms.sol
shows that DstackKms inherits Ownable2StepUpgradeable and UUPSUpgradeable
(line 21), concentrating full key-release policy control in onlyOwner:
DstackKms.sol function | Line | Modifier | Effective authority over KMS TCB |
|---|---|---|---|
_authorizeUpgrade(address) | 199 | onlyOwner | Replace the entire KMS authorization contract logic via UUPS proxy upgrade |
setAllowAnyTeeVariant(bool) | 323 | onlyOwner | Permit arbitrary TEE variants |
setRequireKmsLaunchTicket(bool) | 343 | onlyOwner | Toggle launch-ticket gating for KMS replicas |
setGatewayAppId(string) | 369 | onlyOwner | Reassign the privileged Cloud gateway app identity |
addKmsAggregatedMrAtEpochs(...) | 454 | onlyOwner | Allowlist a new KMS binary measurement for existing key epochs |
addKmsDeviceAtEpochs(...) | 487 | onlyOwner | Allowlist a new hardware device ID for KMS replica handover |
addOsImageHashAtEpochs(...) | 513 | onlyOwner | Allowlist a modified guest OS image hash across epochs |
On 22 November, after we queried both deployed DstackKms proxies on-chain, Hang Yin
confirmed the 2-of-3 setup and stated a plan to
upgrade governance to “3-of-3 for emergency, and 2-of-3 with 1 week delay for normal operation.”
We re-queried both proxies live via public Ethereum and Base JSON-RPC nodes on 1 December 2026 to verify
current production state:
| Chain & Block (1 Dec 2026) | DstackKms Proxy & Implementation | owner() Safe | Threshold & Signers | Guard / Delay Modules |
|---|---|---|---|---|
| Ethereum block 26,533,173 |
0xd343a3f5593b93D8056aB5D60c433622d7D65a80 impl: 0xfc0b84...240dc2 |
0x3926658a072f82baea5e5a15e1fed8a776f4a663 | 2-of-3 Safe 2 EOAs + 1 contract |
0s timelock guard: 0x0000...0000 · modules: 0 |
| Base block 64,562,593 |
0x2f83172A49584C017F2B256F0FB2Dca14126Ba9C impl: 0x9dfe8c...77b80a |
0x3926658a072f82baea5e5a15e1fed8a776f4a663 | 2-of-3 Safe 2 EOAs + 1 contract |
0s timelock guard: 0x0000...0000 · modules: 0 |
As of 1 December 2026, both Ethereum and Base DstackKms proxies remain owned by the exact
same unguarded, zero-delay 2-of-3 Gnosis Safe. An on-chain execution is publicly visible after the fact—a
meaningful transparency upgrade over a centralized Cloud KMS—but two signatures can still immediately whitelist a
new KMS measurement or upgrade the contract with zero exit window for tenants. When Phala implements its planned
multisig upgrade, one critical constraint applies: any 3-of-3 emergency fast path must only be able to pause or
revoke, never add new KMS/OS measurements or call _authorizeUpgrade without the full 1-week
timelock, and signers should include genuinely independent external parties.
4. Live $0.00 audit of rebuilt inference.phala.com & private-ai-gateway (1 December 2026)
Rather than sending paid inference probes—which on Phala currently require a credit card rather than accepting
anonymous crypto payments (an ironic choice for a crypto-token privacy project, especially given that its live
gateway sends API-key auth and usage accounting to an external non-TEE control plane)—we performed a
$0.00, zero-account, read-only public audit of Phala's rebuilt confidential inference stack on
1 December 2026: live unauthenticated GET /v1/models, GET /v1/attestation/report,
embedded app_compose, live TLS leaf SPKIs, the gateway's own on-chain Base DstackApp
contract, and the open-source
Dstack-TEE/private-ai-gateway +
private-ai-proxy (pap) codebase (main @ 437faf11; live gateway
pinned to commit 9f3e693b).
4.1. Live gateway keys still come from dstack-kms—and its Base DstackApp has zero-timelock upgrades
- No boot-ephemeral key path:
DstackAciProvider(src/dstack.rs:104–251) is the only productionKeyProvider(src/main.rs:3–5: “There is no ephemeral-key or stub-quote startup path”). Live/v1/attestation/reportconfirms every production key—dstack-kms-e2ee-v1(secp256k1, also reused across ECDH decryption and legacy ECDSA signing),dstack-kms-e2ee-x25519-v1,dstack-kms-receipt-ed25519-v1,cache-salt,prefix-hash, anddstack-ingressdeterministic TLS keys (DETERMINISTIC_TLS_KEY: "true") forinference.phala.com,tee.redpill.ai, andapi.redpill.ai—is deterministically derived fromdstack-kms. - Live on-chain Base verification (block
64,703,575): The gateway's attestedapp-id(0x89c51ab856bee41efe78c40309a4deb277a02a0f) is a liveversion() == 2UUPSDstackAppproxy (impl0x257ff5...b0d9) on Base owned by 0x1f2309c1856b73821919dc3fee40845703c87d4c—a 2-of-3 Gnosis Safe of 3 EOAs withguard = 0x0,0modules, and zero timelock (sharing signer0x3d1977...a353with the BaseDstackKmsSafe). Read-onlyeth_calldry-runs from that Safe succeed (0x) forupgradeToAndCall,addComposeHash, andsetAllowAnyDevice(true).allowAnyDevice()isfalse(good: devices are pinned),requireTcbUpToDate()isfalse, and a second compose hash (0xe5b009c0..., added at block64,681,769) is currently authorized alongside the live serving compose hash (0xf7136328...). That directly confirms the Shadow-CVM property still applies to rebuiltinference.phala.com.
4.2. Aggregator routing: 18 / 34 (52.9%) listed is_tee: true models have zero Phala backends
Live GET https://inference.phala.com/v1/models lists 34 models, all tagged
"is_tee": true, served behind "serving": "aggregator":
Backend provider set (/v1/models) | Models | Share | Live /v1/attestation/report?model=... observation |
|---|---|---|---|
['phala'] (Phala-only) | 12 | 35.3% | aci/1 gateway quote + 2–8 Blackwell/Hopper GPU entries |
['chutes'] (Chutes-only, incl. deepseek-v4-flash-0731) | 9 | 26.5% | Bypasses aci/1 — returns raw "attestation_type": "chutes" |
['near-ai'] (NEAR AI-only, e.g. flux.2-klein-4b) | 4 | 11.8% | Pairs CPU-only Phala gateway TDX quote with NEAR AI's 8 Hopper GPUs under the same nonce |
['tinfoil'] (Tinfoil-only) | 3 | 8.8% | aci/1 gateway quote with nvidia_payload = 0 GPUs |
Mixed multi-provider (chutes, near-ai, tinfoil, 0g, privatemode, fortanix, phala) | 6 | 17.6% | 4 include Phala; 2 have zero Phala backends (total 11/34 route to Chutes, 6/34 to NEAR AI) |
In aggregator mode, client E2EE v2 terminates inside the CPU-only gateway
(src/aggregator/service/e2ee.rs:251–369): prompts are decrypted in gateway RAM and forwarded as
plaintext JSON over SPKI-pinned HTTPS to Phala Direct, NEAR AI, and Tinfoil (re-encrypted upstream only for
Chutes ML-KEM-768 and 0G HPKE). E2EE is also rejected on /v1/messages, /v1/responses,
/v1/images/*, and /v1/audio/*, and E2EE replay protection is process-local RAM only
(allowing cross-replica replay across replicas sharing the same KMS-derived keys).
4.3. Verifier, client (pap), and control-plane findings in Dstack-TEE/private-ai-gateway
| Component & Source Path | Verified Behavior (1 Dec 2026) | Security Impact |
|---|---|---|
pap CLI & Desktop Managed Modeapps/desktop/cli/args.rs:58–88serve/managed.rs:139transcript.rs:175–194 |
accepted_composes, accepted_subjects, and accepted_dstack_kms_root_public_keys all default to empty. When KMS custody (id-5) is SKIP, Transcript::verified() still returns VERIFIED (exit 0). clients/verifier-ts never checks id-5 at all. |
Fail-open default Out of the box, any attacker-deployed dstack TDX CVM running any compose file under any KMS passes VERIFIED. Neither pap nor verifier-ts gates Intel TDX TCB freshness (OutOfDate passes id-1) or verifies NVIDIA GPU quotes. |
phala-direct GPU verifierscripts/provider_verifier/phala_direct.py:397–420confidential_verifier/verifiers/nvidia.py:79–89 |
Runtime NVIDIA NRAS errors are caught and swallowed (gpu_attested = False; still emits result: "verified"). NvidiaGpuVerifier._decode_jwt decodes NRAS JWTs with verify_signature: False (# TODO: Fetch JWKS...). |
Unverified runtime NRAS Runtime GPU attestation is non-fatal and unsigned in the verifier path (hard gate relies on boot-time RTMR3 event). accepted_dstack_app_ids also defaults to None. |
chutes & near-ai verifiersscripts/provider_verifier/chutes.py:160–170, 541–544nearai.py · src/aci/upstream/near.rs:346–354 |
chutes.py swallows NRAS failures, fetches TDX reference measurements from Chutes' own API (/servers/tdx/measurements), and does not gate TCB status. nearai.py attests only NEAR's router quote (without prod-OS/TCB/debug/KMS/compose gates); streaming skips model signatures. |
Self-reported / router-only Third-party GPU execution is not cryptographically pinned to operator-independent GPU measurements. |
Model weights provenancesrc/aggregator/service/claims.rs:220–221 |
Explicitly left Unknown across all providers: “no verifier here checks the served weights.” |
Unverified weights Receipts sign gateway HTTP byte hashes, not model weights or per-token sampling logits. |
KV-cache isolation & prefix_hashsrc/middleware/cache_salt.rs:29–62src/middleware/request_features.rs:101–110 |
Middleware mode does strip caller cache_salt and inject a KMS-derived per-user_id HMAC cache_salt (good—though direct mode, anonymous calls, SecretAi, and AciService get None, and upstream engines are not attested to enforce it). However, default-on request_features::extract computes prefix_hash = HMAC-SHA256(key, "opening\0" || [system_msg, first_msg])[:32] without user_id and sends it to the untrusted external control plane. |
Cross-tenant prefix oracle Two different tenants sending the same system prompt + first message produce an identical 128-bit prefix_hash visible to the external billing/control plane—compounding the metadata link created by credit-card-only billing. |
5. The standard-API router boundary: why direct client E2EE matters
This incident also highlights a structural distinction—not a bug in OpenRouter (which had no breach, acted quickly to off-board affected providers, and is adopting Dragos's canary testing into ongoing checks), but an inherent boundary of any standard OpenAI-compatible multi-provider router.
Multi-provider routers exist to inspect standard HTTPS requests so they can route, bill, enforce fallback rules,
and normalize APIs across dozens of independent providers. By contrast, verifying a provider's hardware TEE
attestation—such as running Phala's own
private-ai-proxy
(pap serve https://inference.phala.com)—requires a direct client-to-provider verification path. When
traffic arrives over standard OpenAI-compatible HTTPS rather than a client-verified E2EE enclave channel, callers
rely entirely on the upstream provider's internal gateway enforcement—so when Phala's own gateway forwarded live
traffic to its experimental GPU3 server without attestation checks, the rootkit remained invisible
for 11 days until HD Moore / Dragos canary credentials triggered external alerts.
Phala's post-incident fix (enforcing aci_verified = true inside its own
private-ai-gateway) closes that internal gap on Phala's side. Still, for workloads that require
cryptographic rather than operational guarantees, only client-side quote verification + end-to-end
encryption directly to an enclave key can make a misconfigured backend or intermediary fail closed automatically.
6. Decoupled KMS vs. Zero-KMS ephemeral E2EE
Stateful cloud applications (databases, wallets, long-lived user storage) genuinely need persistent key
management across host reboots—which is why dstack built a decoupled KMS in the first place.
Stateless confidential LLM inference does not.
For LLM inference, there is no reason for a persistent root key, replica handover protocol, or external KMS
policy backend to exist anywhere in the prompt-decryption path. Our reference implementation in
llmverify/tee.py
(hardened across 8 independent red-team rounds and running live on a real AMD EPYC Milan SEV-SNP
node in our Live TEE Demo) eliminates the entire KMS attack surface:
| Security property | Phala Legacy Cloud KMS (pre-6 Nov) | Phala Rebuilt inference.phala.com (1 Dec) | Zero-KMS Ephemeral E2EE (llmverify/tee.py) |
|---|---|---|---|
| Prompt encryption boundary | Standard HTTPS API; TLS terminated at provider gateway | SPKI-pinned TLS + E2EE v2 to CPU-only gateway (decrypted in gateway RAM; plaintext HTTPS to Phala/NEAR/Tinfoil; re-encrypted to Chutes/0G) | Client → Enclave RAM Per-request ephemeral X25519 + ChaCha20-Poly1305; untrusted proxy sees opaque padded ciphertext only |
| Silent unattested backend swap | Exploited (11 days) Phala's gateway sent 152k requests to GPU3 with no attestation check |
Partial / config-dependent Pre-I/O aci_verified=true on tee_only_domains, but default pap accepts any dstack CVM & runtime NRAS is non-fatal on phala-direct/chutes |
Cryptographically impossible Client verifies AMD ARK→ASK→VCEK, pinned measurement & weights SHA-256 locally before encrypting |
| Persistent KMS root key & Shadow-CVM risk | Exploited (7 handovers) 19 replicas shared root key; 509 getKey() apps permanently leaked |
Policy-dependent All live keys still derived from dstack-kms; both DstackKms & gateway DstackApp owned by 0s-timelock 2-of-3 Safes |
Zero persistent KMS RAM-only boot-ephemeral X25519 & Ed25519 keys bound into hardware report_data; no replica or shadow CVM can derive them |
| Cross-tenant KV-cache & metadata isolation | Engine-dependent | Salted, with metadata leak Per- user_id HMAC cache_salt in middleware mode (unattested upstream), but default prefix_hash omits user_id & credit-card-only billing links identity to control-plane usage |
Enforced fail-closedprefix_caching=false, single slot 0 erased after every reply, committed in hardware report_data; zero account/billing metadata |
| Per-token model & sampling proof | Session/request receipt via pap (not per-token logits) |
Gateway Ed25519 HTTP byte-hash receipt via pap; model_weights_provenance = Unknown |
Quote-bound receipt v2Ed25519-signed top-20 logprobs & Gumbel/greedy replay checked on every token in-browser |
7. Honest credit, what Phala fixed, and audit boundaries
Credit where it is due: Phala's 23 November
detailed incident report is one of the most transparent post-mortems published by any AI infrastructure
provider in 2026. Rather than hiding behind vague “configuration issue” language, Phala published the
exact UTC timeline, exact affected request count (152,092), exact app counts (2,169
total, 509 requiring manual key migration), corrections to its preliminary notice, and open
remediation items—and took concrete engineering steps:
- Replaced the legacy KMS on 6 November with a dedicated 3-node KMS cluster checking compose hash, measurement, and device identity, with replica handover turned off outside migration windows.
- Shipped key-epoch migration (
dstack PR #1574), migrating2,179 / 2,271CVMs by 21 November, and removed the separate SSH-enabled development OS image indstack 0.6. - Moved the host VMM to an authenticated Unix socket behind nginx, enforced host guard across hosts, shut down
the legacy host-process gateway, and open-sourced
private-ai-gatewaywith several genuinely strong controls: strict leaf TLS SPKI pinning (verified live acrossinference.phala.com,tee.redpill.ai, andapi.redpill.ai), fail-closed pre-I/O gating and signed refusal receipts ontee_only_domains, per-user HMACcache_saltinjection in middleware mode, mandatory CPU+GPU bound NRAS onarmet-aiandsecret-ai, and a candid self-audit (docs/reviews/aci-spec-conformance-gaps.md) documenting 14 remaining spec gaps.
Audit boundaries: Everything in this case study is verified directly from primary public artifacts—HD Moore
and Dragos's canary-token report, Phala's 23 November incident report, OpenRouter's announcement,
DstackKms.sol and DstackApp.sol in Dstack-TEE/dstack,
Dstack-TEE/private-ai-gateway (main @ 437faf11), the public 21–22 November
X thread, live Ethereum/Base JSON-RPC queries, and live unauthenticated $0.00 read-only probes of
https://inference.phala.com run on 1 December 2026. We did not perform active penetration
testing against Phala's infrastructure or run paid authenticated KV-bleed timing tests against
inference.phala.com (which requires credit-card billing rather than anonymous crypto payments).
The broader lesson goes well beyond Phala: across our audits of NEAR AI (94–99.9%
intra-TEE KV bleed), Chutes SN64 (dynamic keys outside RTMR3 and zero E2EE
attestation checks), Venice AI (fail-open E2EE signature check and cross-provider bleed),
and now Phala, hardware TEE silicon was never the weak link. Every real-world failure lived in the
surrounding policy layer, proxy layer, or cache layer—precisely the layers that must be removed from the trusted
computing base rather than patched around.
More standalone audits & live reference implementation
Verify a live AMD EPYC Milan quote, X.509 RSA-PSS-4096 chain, per-request E2EE streaming, and Ed25519 token receipts 100% locally in your browser.
4/4 live GPU TEE models bleed 94–99.9% cached tokens for ≥3 min idle; 100% blind timing-only ticker extraction for $0.0033.
Dynamic Cosign/Helm keys outside RTMR3, zero attestation checks in official E2EE SDK/proxy, and 97.8–99.5% Try-1 KV bleed.
The 5-point Confidential LLM Engineering Checklist and open-source reference protocol hardened across 8 red-team rounds.