Monero · Report #3619409
Windows installer grants low-privileged users write access to executable P2Pool directory, enabling local code execution
How it was found
Summary
The Windows installer creates the P2Pool subdirectory inside the machine-wide install path with overly broad write permissions:
installers/windows/Monero.iss:59Name: "{app}\p2pool"; Permissions: users-full
The GUI later trusts and executes p2pool.exe from that directory when the user starts P2Pool mining:
src/p2pool/P2PoolManager.cpp:124-129(isInstalled()only checks file existence)src/p2pool/P2PoolManager.cpp:154-210(start()executesp2pool.exe)src/p2pool/P2PoolManager.cpp:243-248(Windows path is{applicationDirPath()}/p2pool/p2pool.exe)pages/Mining.qml:295-318andpages/Mining.qml:654-656(GUI path to starting P2Pool)
This creates a local binary planting issue: a low-privileged local user can replace or plant p2pool.exe in the writable P2Pool directory, and Monero GUI will later execute that attacker-controlled binary when a victim starts P2Pool from the GUI.
Releases Affected
- Windows installer builds that include commit
432650008c4af92db138041d15b06e43fba0b7abdated 2022-05-28 (Use "p2pool" folder for p2pool on Windows) - I have not yet confirmed the earliest tagged release containing this change
- I reviewed the local source tree on 2026-03-20
Why This Is Security-Relevant
The affected directory is part of a machine-wide installed application under Program Files, but the installer intentionally grants broad write access to ordinary users. That turns a trusted executable location into a user-writable code execution surface.
Because the GUI later launches p2pool.exe from that location, any low-privileged local attacker can cause attacker-controlled code to run in the context of whichever user later starts P2Pool from Monero GUI.
This is not a remote issue. It is a local privilege/trust-boundary issue.
Steps To Reproduce
- Install Monero GUI on Windows using the normal installer.
- Confirm that the installer created a writable P2Pool directory:
- Example target path:
%ProgramFiles%\Monero GUI Wallet\p2pool - Collect ACLs with
icacls "%ProgramFiles%\Monero GUI Wallet\p2pool"
- Example target path:
- From a low-privileged local user account, place a benign proof-of-concept executable at:
%ProgramFiles%\Monero GUI Wallet\p2pool\p2pool.exe
- Use a harmless PoC executable that only creates a marker file such as:
%TEMP%\monero_p2pool_poc.txt- and writes a short message plus current username and timestamp
- Launch Monero GUI as the victim user.
- Go to the Mining screen and start P2Pool mining.
- Observe that the planted
p2pool.exeis executed instead of a trusted bundled binary. - Verify execution through:
- the marker file
- process creation logs
- GUI behavior
Expected Result
Low-privileged users should not be able to modify executables or executable search locations inside the machine-wide installed application directory.
Actual Result
The installer grants broad write access to the executable P2Pool directory, and the GUI later executes p2pool.exe from that directory without any additional integrity check.
Supporting Material / References
Code references:
installers/windows/Monero.iss:57-59src/p2pool/P2PoolManager.cpp:124-129src/p2pool/P2PoolManager.cpp:154-210src/p2pool/P2PoolManager.cpp:243-248pages/Mining.qml:295-318pages/Mining.qml:654-656
Git history:
- Commit
432650008c4af92db138041d15b06e43fba0b7abdated 2022-05-28 - Commit message:
Use "p2pool" folder for p2pool on Windows
Planned attachments:
TODO: screenshot or text output of icacls on the p2pool directoryTODO: SHA-256 of the benign planted p2pool.exeTODO: screenshot or recording of starting P2Pool from Monero GUITODO: screenshot or contents of the marker fileTODO: Sysmon / Procmon / Windows Event log process creation evidence showing execution of planted p2pool.exe
Novelty Check
I searched the public Monero GUI repository history, issue tracker, and public advisory surfaces for this behavior. I found the feature-introduction commit above, but I did not find a public security fix, advisory, or public duplicate specifically describing the installer-created writable executable P2Pool directory leading to local binary planting and execution.
AI Assistance Disclosure
I used OpenAI Codex 5.4 with extra high reasoning to help review the local source code and draft this report. All findings, verification status, and final submission contents were reviewed by me before submission.
Impact
A low-privileged local attacker can plant or replace p2pool.exe inside the writable P2Pool directory created by the Windows installer. When another user later starts P2Pool through Monero GUI, the attacker-controlled binary executes in that victim user's context.
This enables:
- cross-user local code execution
- persistence in a trusted application path
- compromise of the victim user's confidentiality, integrity, and availability
- possible privilege escalation if a higher-privileged user later runs Monero GUI and starts P2Pool
In practice, this means local malware or another unprivileged user on the same Windows system can turn Monero GUI's P2Pool feature into an execution trigger for arbitrary code.