Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status of CVE-2023-41626? / Security contact e-mail not working? #8337

Closed
refiller opened this issue May 20, 2024 · 7 comments
Closed

Status of CVE-2023-41626? / Security contact e-mail not working? #8337

refiller opened this issue May 20, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@refiller
Copy link

refiller commented May 20, 2024

It looks like there is a CVE against Gradio, https://nvd.nist.gov/vuln/detail/CVE-2023-41626 , opened in April.

I haven't been able to find any responses from the Gradio team on this online

It looks like the CVE is based on a malicious file upload, I know some of those tend to get rather tricky / opinionated. Is it the Gradio team's opinion that this is not a real issue? Is this a "won't fix" CVE because they consider it user error?

Also your security team e-mail (team@gradio.app) did not work, I just got an undeliverable mail message back. I'm not sure of any other way to reach out to ask about this. I don't use Discord.

@refiller refiller added the bug Something isn't working label May 20, 2024
@refiller refiller changed the title Status of CVE-2023-41626? Status of CVE-2023-41626? / Security contact e-mail not working? May 20, 2024
@abidlabs
Copy link
Member

Hi @refiller this issue has been fixed as part of #7503

Also your security team e-mail (team@gradio.app) did not work

Where did you see this email? This has been replaced with: gradio-team@huggingface.co

@refiller
Copy link
Author

Hello, that e-mail can be found here https://github.com/gradio-app/gradio/blob/main/SECURITY.md

It's good to hear it's been fixed, is it part of any release yet? It seems like the CVE record thinks even the latest version is still vulnerable.

@abidlabs
Copy link
Member

abidlabs commented May 20, 2024

Yes I’ll issue a CVE advisory but it’s fixed in the latest version: 4.31.4, as well as many older versions

@refiller
Copy link
Author

refiller commented May 20, 2024

An advisory would be really helpful, thank you!

And thanks for the information too!

@abidlabs
Copy link
Member

Hi @refiller I looked into this and actually the CVE in question is a little unclear. If its referring to GHSA-48cq-79qq-6f7x, then indeed that issue has been patched since gradio==4.19.2 and we have a published advisory for it.

If on the other hand, its referring to users being able to upload arbitrary files to a Gradio app that includes a file upload component (such as gr.File or gr.UploadButton), then this is indeed intentional and would be classified as a "won't fix". This would be similar to a Flask app or FastAPI app accepting any files to be uploaded in a general upload route.

@refiller
Copy link
Author

Hello @abidlabs

https://nvd.nist.gov/vuln/detail/CVE-2023-41626 is the one I'm referring to, and it looks like that's the "won't fix" one.

The gist https://gist.github.com/impose1/590472eb0544ef1ec36c8a5a40122adb (apparently that's all it takes to report a vuln) says this:

Gradio v3.27.0 was discovered to contain an arbitrary file upload,Uploading files to the/tmp directory may result in malicious access to website permissions if there are file containing vulnerabilities in other sites on the server.

I'm trying to understand why the author thought this was a High vulnerability.

  • What is the problem with this? Can Gradio be tricked into executing something in the /tmp directory or something?
  • I don't see a problem with gradio allowing arbitrary file uploads (plenty of things support this)
  • I might see the author's point if the server admin could unexpectedly cause an arbitrary code execution situation, as in, if Gradio auto-executes anything in /tmp
  • I would not consider it a vulnerability if Gradio e.g. allowed somebody to upload a python file, and then the admin put code in to execute it. That's not Gradio's fault, that's the person using Gradio's fault.

@abidlabs
Copy link
Member

That's an excellent question for the author of that CVE

What is the problem with this? Can Gradio be tricked into executing something in the /tmp directory or something?

Not as far as I know. If a security researcher finds this, and can provide us a PoC, we would treat this as a high-priority security vulnerability

I don't see a problem with gradio allowing arbitrary file uploads (plenty of things support this)
I might see the author's point if the server admin could unexpectedly cause an arbitrary code execution situation, as in, if Gradio auto-executes anything in /tmp
I would not consider it a vulnerability if Gradio e.g. allowed somebody to upload a python file, and then the admin put code in to execute it. That's not Gradio's fault, that's the person using Gradio's fault.

Agreed with these points

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants