RT-2026-018: Mujina: a misbehaving pool could quietly stop your miner
Status: Fixed in commit
3234f75(2026-08-14) · Severity: High (draft score 8.2 of 10) · CVE: Not requested · Published: 2026-12-01
In short
Mujina is the 256 Foundation's own open-source mining firmware. It stays connected to a mining pool, which sends it work. This one is on us: our own Red Team found that Mujina trusted the pool a little too much.
A pool could send one message that never ends, and Mujina would keep storing it until it could run out of memory. Or the pool could go quiet, and Mujina would wait for work forever. Either way, mining stops. Only someone running your pool, or tampering with the traffic to it, can do this.
Make sure your Mujina build includes commit 3234f75 (2026-08-14) or later.
Am I affected?
- Affected: official Mujina builds without all three parts of the fix (
3d499b5,1a891cdand3234f75). Confirmed in the build from 2026-08-03 (1a69ef4). - Fixed: the main code line at or after
3234f75(2026-08-14). - Not checked: forks. Check them against their own history.
The attacker must either run the pool you mine on, or be able to change the unencrypted traffic between your miner and the pool: for example, someone on the same network, a hacked router or a hostile ISP.
What was wrong
Imagine the pool phoning your miner, and the miner writing down every word until the sentence ends. A hostile pool just never finishes the sentence. The miner keeps writing, page after page, until it runs out of paper. Or the pool stops talking, and the miner holds the phone forever, never hanging up to call back.
In plain terms, Mujina had no size limit on a message from the pool, and no time limit for a pool that stopped sending work.
What could an attacker do?
Stop your miner from mining, in one of three ways:
- One endless message: memory use keeps growing until the miner software can run out.
- A silent or slow pool: the miner stays connected but gets no new work, and nothing makes it reconnect.
- No reply to a submitted result: the miner is stuck until that request times out, and again doesn't reliably reconnect.
What we tested: on a test setup that mines with an ordinary computer's processor, we saw the memory growth and a lasting stall, but not a full out-of-memory shutdown.
What we did not show: running the attacker's code on the miner, redirecting payouts, stealing hashrate or damaging hardware. We found no memory corruption.
How we fixed it
The Mujina maintainers merged PR #89 on 2026-08-14. It:
- limits each message from the pool to 64 KiB, and reconnects if one is longer;
- treats an unanswered result as a dropped connection, and reconnects;
- throws away old work and reconnects if no new work arrives for two minutes, waiting a slightly random time between attempts.
That day we pointed Mujina at a deliberately hostile pool: the oversized message was rejected and the miner recovered cleanly on every recorded run. A 2026-09-02 review found all three fixes on later code and confirmed the old build still had the problem. On 2026-11-27 we rechecked the source, without rerunning tests: the fix is still there.
What you can do now
- Update to a build that includes
3234f75(2026-08-14) or later. - Mine on a pool and network you trust.
- Watch actual mining (accepted shares, fresh work, hashrate) and memory that keeps climbing, not just whether the miner is on.
- If something restarts Mujina automatically, give it a memory limit. That shortens an out-of-memory outage, but won't rescue a miner waiting on a silent pool.
Technical details
For readers who want the specifics:
- Audited at commit
1a69ef40f7ec0b5020de6234a91551dc307a0c21. Connection::read_messagepassed a growableStringto Tokio'sBufReader::read_line. Its capacity is not a limit, and parsing waited for a newline, so the peer decided how much data piled up in the Stratum receive buffer.- The main client loop awaited
read_message()with no idle timeout, and the job source had no maximum gap between jobs. - The same loop logged a failed share submission and carried on instead of reconnecting. An unanswered share submission blocked the command path until it timed out.
- Fix, PR #89, merged as
3234f75: - Original testing was host-based on the CPU backend. The 2026-08-14 hostile-pool retest saw
MessageTooLargeand clean recovery on every recorded pass.
Timeline
The Red Team and the Mujina maintainers are both part of the 256 Foundation, so there was no separate vendor disclosure.
| Date | Event |
|---|---|
| 2026-08-07 | Found in a 256 Foundation Red Team source review; fix opened as PR #89 |
| 2026-08-14 | Fix tested against a hostile pool and merged |
| 2026-09-02 | Second review confirmed the fixes on later code; the older build still had the problem |
| 2026-11-27 | Source review reconfirmed the fix |
| 2026-12-01 | Advisory published |
Credits
Found by the 256 Foundation Red Team. Fixed, reviewed and merged by the Mujina maintainers.
References
- Fix: PR #89, commits
3d499b5,1a891cdand3234f75 - CWE-770: Allocation of Resources Without Limits or Throttling
- Scoring: CVSS 4.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N(draft, unreviewed)
Revision history
| Date | Change |
|---|---|
| 2026-12-01 | Initial publication |
The 256 Foundation follows coordinated vulnerability disclosure. See our Responsible Disclosure Policy.