Reply to post: Re: No need for path games

Alert: 15-year-old Python tarfile flaw lurks in 'over 350,000' code projects

OhForF' Silver badge

Re: No need for path games

I agree, when extracting a tarball from a not 100% trustworthy source you have to know it can overwrite anything accessible to the user running it.

If you need it to only access stuff inside directory other than / you can use chroot.

Assuming python (or tar or whatever) will behave like it was in a chrooted environment is just a wrong assumption and not a python problem.

While that ../ path squashing might be unexpected and considered weird by some it shouldn't be a security problem.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon