Repository navigation
Description
Affected layers
- Frontend (
src/): affected. Both SRI presets insrc/lib/pools.ts, "SRI Pool" and "SRI Community Solo Pool", pin9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72for75.119.150.111:3333.SRI_POOL_AUTHORITY_KEYinsrc/lib/miningIdentity.tsis the same value, andisSriPoolcompares against it to choose the SRI identity form, so the presets and that constant must change together. - Backend (
server/): not affected. It writes the pool key the client submitted into the generated TOML and does not choose it. The same key is also the local JDC's own identity, whose secret half the generator writes; that is docker: each deployment runs its JDC with its own Noise authority keypair #350. shared/: not affected by this issue.JDC_AUTHORITY_PUBLIC_KEYinshared/src/constants.tsis the same string, but it names the local JDC's listener, covered by docker: each deployment runs its JDC with its own Noise authority keypair #350, and the pool's rotation does not touch it.- From sv2-apps: the key is the public half of the example keypair that stratum and sv2-apps ship in their config examples. Its secret half is in those repositories and in this one.
Problem
The authority key a preset pins is what lets JDC and the Translator verify, during the Noise handshake, that they reached the real pool. The key pinned for the SRI pool has a published secret half, so anyone can complete that handshake as the pool. The hosted pool at 75.119.150.111 runs with that keypair today, so the preset is correct for now and cannot change on its own: a new key in the preset would fail against the pool until the pool rotates.
Impact
An attacker who can redirect or intercept traffic to 75.119.150.111:3333 can impersonate the SRI pool for every operator who picked the preset, receive the configured identity and control the SV2 session. Whether that reaches the reward depends on payout verification downstream; the transport authentication the pinned key is meant to give is already lost. The attacker needs a position on the network path.
Expected outcome
- The SRI presets pin a key whose secret half is held only by the hosted pool, and the pool answers with that key.
- Picking an SRI preset still brands the pool and still offers the SRI identity form after the key changes.
Possible approach (non-binding)
Blocked until the hosted pool rotates its key. Once it has, update the two presets and SRI_POOL_AUTHORITY_KEY from one constant so they cannot drift, and decide how a saved setup with the retired key is handled; prepareServiceConfig already turns a saved setup that no longer validates into a setup-review notice, which may be the place. src/lib/pools.test.ts can assert that no preset pins the retired key, as the Loupe proof of concept does, and that isSriPool recognizes each SRI preset.
Loupe findings
- project-loupe/audit-sv2-ui#12: the SRI presets pin the public half of the example keypair whose secret half is published (reported as setup: the SRI presets pin an authority key whose secret half is not published #349)
Related issues and PRs
- The pinned key is the public half of the example keypair shipped by stratum and sv2-apps. docker: each deployment runs its JDC with its own Noise authority keypair #350 covers its secret half in the generated JDC config and is fixable in sv2-ui alone.
- The hosted SRI pool at 75.119.150.111 currently uses that keypair, so the preset cannot change before the pool rotates its key. remove shared authority secrets from deployable examples sv2-apps#784 tracks removing the keypair from the deployable examples and documenting the rotation.
- Tracker: [Tracker] Setup and settings flows #374.
Loupe export for #349 (finding #12)
Finding
- repo:
stratum-mining/sv2-ui(https://github.com/stratum-mining/sv2-ui.git) - reviewed revision:
8b469c2cf5a5425c5e1f2222cb628fa9deca8a3b - title: SRI presets trust a publicly known Noise authority key
- severity:
medium - location:
src/lib/pools.ts:37 - cwe: CWE-321
- scanner:
llm-code-review - fingerprint:
56e48e475764de3d5d140cdf24e3095f6e3fbad303ad588a9a418b7675955dd7
Description
POOL_MINING_JD pins 9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72 for the remote SRI pool, and the same compromised trust anchor is pinned again for SRI Community Solo Pool at line 95. In-tree evidence shows this is not just an arbitrary public key: shared/src/constants.ts:35 reuses it as JDC_AUTHORITY_PUBLIC_KEY, while server/src/config-generator.ts:299-300 emits a hardcoded authority secret. Decoding both base58check values in-tree and deriving secp256k1 from that committed secret yields an x-coordinate matching the public payload suffix (24ee...), so anyone with the repo can authenticate as the authority expected by these presets. A network attacker who can redirect or intercept traffic to 75.119.150.111:3333 can therefore impersonate the SRI upstream and receive the configured user identity / control the authenticated SV2 session; whether that extends to reward theft depends on downstream payout-verification behavior outside this worktree, but the transport-authentication guarantee is already lost. Rotate the SRI preset authority key and stop reusing a repository-exposed secret. I reviewed prior finding #283 and did not treat it as a duplicate: #283 covers the local JDC shared identity, while this issue remains in the remote preset after local JDC key generation alone is fixed.
Proof of Concept
diff --git a/src/lib/pools.test.ts b/src/lib/pools.test.ts
new file mode 100644
index 0000000..1111111
--- /dev/null
+++ b/src/lib/pools.test.ts
@@ -0,0 +1,14 @@
+import assert from 'node:assert/strict';
+import test from 'node:test';
+
+import { ALL_KNOWN_POOLS } from './pools';
+
+const COMPROMISED_SRI_AUTHORITY_PUBLIC_KEY = '9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72';
+
+test('known pool presets do not trust the publicly exposed SRI authority key', () => {
+ const compromisedPools = ALL_KNOWN_POOLS
+ .filter((pool) => pool.authority_public_key === COMPROMISED_SRI_AUTHORITY_PUBLIC_KEY)
+ .map((pool) => pool.name);
+
+ assert.deepEqual(compromisedPools, []);
+});
This finding was discovered by Project Loupe.
Activity
[-]SRI presets trust a publicly known Noise authority key[/-][+]setup: the SRI presets pin an authority key whose secret half is not published[/+]