Closed Sim4n6 closed 1 year ago
Hi @Sim4n6
Thanks for the submission!
I want to add that it is a bit difficult to convince using the CVSS scoring system maintainers about the severity. Some of them consider it High severity, others succumb to a bit of subjectivity.
Agreed, for that reason, I would like to reevaluate the severity assigned for the 3 medium/moderate CVEs. Can you provide a brief explanation for each of them detailing why they should have a higher severity? (Please include 1) How can an attacker control the untarred file, 2) permissions required and 3) Impact of being able to override a file for those specific systems)
Hi @pwntester
Thank you very much for considering a severity reevaluation.
I would provide details on each moderate severity CVE in separate comments, please.
@Sim4n6
The vulnerability was reported in GHSA-78m5-jpmf-ch7v. I've asked the maintainers for a CVE score reevaluation https://github.com/DataDog/guarddog/issues/223 but with no success ...
The vulnerable code is L153-L158 :
response = requests.get(url, stream=True)
with open(zippath, "wb") as f:
f.write(response.raw.read())
shutil.unpack_archive(zippath, unzippedpath)
url
is a tarball hosted in the PyPI repository.The report was made through GitHub's private reporting feature in here. I suggested the "Scope" metric needs to be Changed since the affected component and the vulnerable one are not the same (the underlying filesystem and gpdb). The malicious tarball could come from CLI in the gpdb CI tool.
The vulnerable code was similar to:
# untar the package into tmp folder
with closing(tarfile.open(self.gppkg.abspath)) as tarinfo:
tarinfo.extractall(TEMP_EXTRACTION_PATH)
An attacker can use this vulnerability to overwrite data or system files potentially leading to a crash or malfunction of the system. That is what the final advisory suggests. As an ethical hacker, I believe with a maliciously crafted tarball, I could own that machine (overwrite a private ssh key for instance) but that would depend on the user's permission to write on ~/.ssh/.
This one is pure gold. The vulnerability was a rare full TarSlip (upload <> download any file). I mean you upload through a web app feature a malicious tarball with a symlink, that gets extracted within the server context using the web app user privileges, and then you could download any file pointed out by the symlink.
PS: You need an authenticated user and the web app is recommended to remain local, with no remote exposure.
Thanks for the additional input. We have reconsider the CVSS assigned to CVE-2022-23530 and CVE-2022-3607 and therefore the submission qualifies for the bounty.
Your submission is now in status Final decision.
For information, the evaluation workflow is the following: Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed
Your submission is now in status Pay.
For information, the evaluation workflow is the following: Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed
Your submission is now in status Closed.
For information, the evaluation workflow is the following: Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed
Created Hackerone report 2023841 for bounty 488338 : [759] [Python] Unsafe Unpacking and TarSlip bug slaying
CVE(s) ID list
All For One submission
https://github.com/github/securitylab/issues/719
Details
Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc).
Blog post link
https://twitter.com/sim4n6