Skip to content

Added testbed for SGLang CVE-2026-3059 - #277

Open
mangeshwalsane2-hash wants to merge 2 commits into
google:mainfrom
mangeshwalsane2-hash:testbeds/CVE-2026-3059-sglang
Open

mangeshwalsane2-hash wants to merge 2 commits into
google:mainfrom
mangeshwalsane2-hash:testbeds/CVE-2026-3059-sglang

Conversation

@mangeshwalsane2-hash

Copy link
Copy Markdown
Contributor

Added testbed for SGLang CVE-2026-3059, Please review.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a reproduction and verification environment for CVE-2026-3059, which involves an unauthenticated ZeroMQ broker deserialization vulnerability in SGLang. It includes a README, a Docker Compose configuration, a custom lab server script, and a ZMTP verification script. The review feedback suggests adding defensive checks in sglang_lab_server.py when dynamically loading the scheduler client module to prevent cryptic errors if the module or its loader cannot be resolved.

Comment on lines +29 to +34
spec = importlib.util.spec_from_file_location(
"scheduler_client",
"/sgl-workspace/sglang/python/sglang/multimodal_gen/runtime/scheduler_client.py",
)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The importlib.util.spec_from_file_location function can return None if the file cannot be found or the spec cannot be created. Directly passing spec to importlib.util.module_from_spec without checking if it is None or if spec.loader is None will raise a cryptic ValueError or AttributeError. Adding a defensive check ensures a clear and actionable error message is raised if the file is missing or inaccessible.

spec = importlib.util.spec_from_file_location(
    "scheduler_client",
    "/sgl-workspace/sglang/python/sglang/multimodal_gen/runtime/scheduler_client.py",
)
if spec is None or spec.loader is None:
    raise ImportError("Could not load spec or loader for scheduler_client.py")
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)

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