Message393234
TL;DR - A tar file being extracted doesn't check to see if it is overwriting an existing file, which could be a symlink to elsewhere leading to elsewhere's contents being clobbered assuming the elsewhere file exists.
doing an unlink before opening the destination file (ignoring either success or FileNotFound) during extract would avoid this _specific_ case.
But tarfile is already documented with a warning about untrusted inputs being able to do bad things:
https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall
fixing this one serialized case doesn't do anything about other cases or race conditions we won't claim protection against, so I'm not sure this issue is serious from a stdlib perspective. |
|
Date |
User |
Action |
Args |
2021-05-08 03:14:10 | gregory.p.smith | set | recipients:
+ gregory.p.smith, eric.araujo, leveryd |
2021-05-08 03:14:09 | gregory.p.smith | set | messageid: <1620443649.95.0.346764753546.issue44023@roundup.psfhosted.org> |
2021-05-08 03:14:09 | gregory.p.smith | link | issue44023 messages |
2021-05-08 03:14:08 | gregory.p.smith | create | |
|