159 days ago · Tech · hide · Fediverse post

I was recently reading Max Justicz’s blog post, where he outlined how he was able to hack the unpkg.com CDN by getting the service to extract a tar file which contained: A symlink to a directory on the system, followed by a file in the symlink/directory, A hardlink pointing to a known file on the system, followed by a file named the same as that hardlink. In practical terms, this, respectively, means: Create a symlink to /tmp called link, and then extract a file to link/oops.txt, Make a hardlink foo to a file (/etc/passwd for example) that exists and unpack a regular file named foo. This will overwrite /etc/passwd. These attacks are pretty similar to the classic zip-slip vulnerabilities, which typically entail just having some type of archive that contains a file path like ../../some/target/file or /some/target/file, causing the extractor to write outside of the intended destination directory. Sometimes symlinks are involved in the classic zip-slip vulnerabilities, but those are…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town