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

Open
secureness opened this issue May 8, 2024 · 6 comments
Open

AI PRP: BentoML Insecure Deserialization RCE #482

secureness opened this issue May 8, 2024 · 6 comments
Assignees
Labels
ai-bounty-prp Identify an AI bounty plugin Contributor queue When a contributor has already one issue/PR in review, we put the following ones on hold with this. 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

@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, finally exploit the CVE report the CVE and exposed UI otherwise just report the exposed UI.

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 queue When a contributor has already one issue/PR in review, we put the following ones on hold with this. PRP:Accepted
Projects
None yet
Development

No branches or pull requests

3 participants