ReCirq
ReCirq copied to clipboard
CVE-2007-4559 Patch
Patching CVE-2007-4559
Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.
If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Hi @TrellixVulnTeam , do you think you could sign the Contributor license agreement so that we could legally use your code?
I'm going to close this 2 year old PR, for the following reasons:
- I looked at the places where
tarfileis used in the code. There are 2. Both download a specific tar file from figshare. An attacker would have to replace that file in order to take advantage of the vulnerability in question; this seems unlikely, or at best a very low-probability event. - The vulnerability is patched in Python 3.12.
- Based on discussions about this matter on python.org, I get the impression that this particular patch itself has bugs. I appreciate the effort by the original authors and don't mean to disrespect it, but right now, without more time studying this, I can't be sure that applying this won't introduce other problems.