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

AI PRP: BentoML Insecure Deserialization RCE #482

Closed
secureness opened this issue May 8, 2024 · 10 comments · Fixed by #520
Closed

AI PRP: BentoML Insecure Deserialization RCE #482

secureness opened this issue May 8, 2024 · 10 comments · Fixed by #520
Assignees
Labels
ai-bounty-prp Identify an AI bounty plugin Contributor main The main issue a contributor is working on (top of the contribution queue). PRP:Accepted

Comments

@secureness
Copy link
Contributor

reference: https://github.com/protectai/ai-exploits/blob/main/bentoml/README.md
I think it is easy to exploit but I must find a solution to create a python pickle easily with java.

@secureness
Copy link
Contributor Author

is it possible to write this plugin in Python, because we need to use the pickle function to serialize the payload with Python?

@maoning
Copy link
Collaborator

maoning commented May 16, 2024

is it possible to write this plugin in Python, because we need to use the pickle function to serialize the payload with Python?

I'm currently working on creating a setup script to run python Tsunami plugins with the main Java program, I will update here once it's ready.

@tooryx tooryx added the Contributor queue When a contributor has already one issue/PR in review, we put the following ones on hold with this. label May 22, 2024
@maoning
Copy link
Collaborator

maoning commented May 23, 2024

@secureness you can now test out python plugins using https://github.com/google/tsunami-security-scanner/blob/master/quick_start_advanced.sh

The script is not thoroughly tested, let me know if you run into any issues.

@maoning maoning added PRP:Accepted ai-bounty-prp Identify an AI bounty plugin labels May 23, 2024
@secureness
Copy link
Contributor Author

@maoning someone said in comments of the CVE report in huntr.dev that only versions between 1.2.0 - 1.2.4 are vulnerable, I haven't tested other versions myself yet, do you accept this as a PRP?

@maoning
Copy link
Collaborator

maoning commented May 24, 2024

@secureness Could you also check for exposed BentoML API (report it as a medium severity finding) in addition to the RCE vuln (report it as a critical finding)? For exposed BentoML API, the worst thing could happen is that the inference service can queried by anyone right? Is there any interesting API endpoints that have additional security risks?

@secureness
Copy link
Contributor Author

secureness commented May 27, 2024

@maoning we can check for a specific swagger UI with a Title containing the bentoML: https://docs.bentoml.com/en/latest/bentocloud/how-tos/call-deployment-endpoints.html#interact-with-the-deployment

we need to know at least one of the HTTP endpoints from Swagger UI to send a pickled payload to that endpoint to exploit the CVE.

So, the logic is this: first check for an exposed swagger UI and find an HTTP endpoint from the UI, and finally exploit the CVE, report the CVE and exposed UI otherwise only report the exposed UI.

@maoning
Copy link
Collaborator

maoning commented Jun 24, 2024

@secureness sounds good, you can proceed forward with this plugin. As exposed API doesn't leads to RCE, let's leave it out of the implementation (After discussing with the team, we think it is better for Tsunami to only focus on RCE vulns).

Please complete the following:

@maoning
Copy link
Collaborator

maoning commented Jul 17, 2024

@secureness I want to check on the status of this issue. Please let me know if you have any updates.

@secureness
Copy link
Contributor Author

Oh, I was waiting for this PR status which is not finalized yet:
#491

@tooryx tooryx linked a pull request Aug 6, 2024 that will close this issue
@tooryx tooryx added Contributor main The main issue a contributor is working on (top of the contribution queue). and removed Contributor queue When a contributor has already one issue/PR in review, we put the following ones on hold with this. labels Aug 6, 2024
@tooryx
Copy link
Member

tooryx commented Oct 23, 2024

Hi @secureness,

Your PR has been merged. This usually means a reward will be granted. Google will start the internal QC process and the reward amount will be determined based on the quality of the detector report. Please be patient and allow up to a week for the QC process to finish. You'll be notified once the decision is made.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai-bounty-prp Identify an AI bounty plugin Contributor main The main issue a contributor is working on (top of the contribution queue). PRP:Accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants