PATH Tilde Expansion Issue Discovered
· via Hacker News
A security issue was found where using a tilde (/.local/bin) in the PATH variable does not expand to the user’s home directory. This happens because tilde expansion only occurs in unquoted inputs, leading to unintended directory paths like .//.local/bin/. The problem can be fixed by replacing the tilde with $HOME/.local/bin/. The issue was identified using the nono agent sandboxing tool, which provided a warning about writable PATH entries. A simple check using grep can identify if the PATH variable contains tildes, prompting users to update their shell configuration files.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.