Unverified50% confidenceSolutionExact time
A reliable way to judge whether a deletion path is safe is to first resolve it (os.path.realpath), then confirm that the resolved result is still within the root directory allowed to be cleaned up, and only then perform the deletion
1
Sources
50%
Confidence
Long-term
Relevance
10/14/2026
First Seen
Sources
Related Entities
Related Claims
UnverifiedOrdinary formatting or file deletion operations cannot truly destroy data; only Secure Erase can completely wipe data.63% similarUnverifiedPlacing relative paths (such as . or ./bin) in PATH brings security risks: when executing commands in an untrusted directory, a malicious program with the same name may be run unexpectedly.61% similarUnverifiedHarden can context-awarely distinguish between legitimate operations and potentially risky behaviors, such as allowing deletion of files in the /tmp directory while blocking deletion of the project source code directory60% similarUnverifiedWhen the operating system looks up an executable file, it searches one by one through the directories listed in PATH in order; putting . into PATH causes the system to preferentially look for a program with the same name in the current directory, and an attacker can place a malicious executable with the same name (such as ls, git, python) to execute malicious code; this type of attack was historically called "current directory hijacking".56% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1025709API
curl https://kongchang.com/api/v1/knowledge/claims/1025709MCP
get_claim(id=1025709)