[CHIA-4392] [Bug] Security `/delete_plot` harvester RPC endpoint does no sanity checking
Author: stonemelodyCreated Dec 31, 2021Updated Aug 26, 2026
Labelsbug
What happened?
The codepath used by the /delete_plot RPC endpoint on the harvester does no sanity checking for the path provided. This means it can delete any file it has permissions to, opening up the chance for errors or unexpected behavior. Confirmed in a container that it can be used to delete files that are not plots (tested by removing the chia config file).
I would suggest allowing it to only delete files in the plot directories the harvester is farming and perhaps restricting it to operate only on files that have a .plot extension. This would reduce the chances of user error and restrict chia from removing files outside the directories the user has explicitly specified in the config file
Version
1.2.11
What platform are you using?
Linux
What ui mode are you using?
CLI
Relevant log output
No response
Source: Chia-Network/chia-blockchain