Skip to content

fix: remove is_main guard on pickle content-type check to protect all…#5610

Open
ChristinaSaikoy wants to merge 1 commit into
bentoml:mainfrom
ChristinaSaikoy:main
Open

fix: remove is_main guard on pickle content-type check to protect all…#5610
ChristinaSaikoy wants to merge 1 commit into
bentoml:mainfrom
ChristinaSaikoy:main

Conversation

@ChristinaSaikoy
Copy link
Copy Markdown

@ChristinaSaikoy ChristinaSaikoy commented May 15, 2026

… services

The pickle deserialization protection in api_endpoint() only applies when is_main=True. Non-entry services in multi-service deployments have is_main=False (the default), leaving them vulnerable to RCE via unauthenticated pickle.loads() on user-controlled request bodies.

Remove the is_main condition so ALL services block the unsafe application/vnd.bentoml+pickle content type.

CWE-502: Deserialization of Untrusted Data

What does this PR address?

Fixes #(issue)

Before submitting:

… services

The pickle deserialization protection in api_endpoint() only applies
when is_main=True. Non-entry services in multi-service deployments
have is_main=False (the default), leaving them vulnerable to RCE via
unauthenticated pickle.loads() on user-controlled request bodies.

Remove the is_main condition so ALL services block the unsafe
application/vnd.bentoml+pickle content type.

CWE-502: Deserialization of Untrusted Data
@ChristinaSaikoy ChristinaSaikoy requested a review from a team as a code owner May 15, 2026 02:01
@ChristinaSaikoy ChristinaSaikoy requested review from jianshen92 and removed request for a team May 15, 2026 02:01
@ChristinaSaikoy
Copy link
Copy Markdown
Author

Friendly ping @jianshen92 — this PR has been open for a week. Is there anything I can do to help move the review forward? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant