Skip to content

Conversation

@russellb
Copy link
Member

@russellb russellb commented Apr 8, 2025

xgrammar 0.1.18 includes a fix for security vulnerability where a
malicious user can cause vllm to consume all of the host's RAM with
the knowledge that each unique grammar adds an entry to an unbounded
cache in memory.

The cache was implemented in xgrammar PR 243:
mlc-ai/xgrammar#243

This commit makes use of the new option to limit the cache size.
The default is 512MB, which should be reasonable for most use cases.
It will cache roughly 1000 json schemas. The cache size can be changed
using the VLLM_XGRAMMAR_CACHE_MB environment variable.

The security vulnerability was reported here:
GHSA-389x-67px-mjg3

Signed-off-by: Russell Bryant [email protected]

xgrammar 0.1.18 includes a fix for security vulnerability where a
malicious user can cause vllm to consume all of the host's RAM with
the knowledge that each unique grammar adds an entry to an unbounded
cache in memory.

The cache was implemented in xgrammar PR 243:
mlc-ai/xgrammar#243

This commit makes use of the new option to limit the cache size.
The default is 512MB, which should be reasonable for most use cases.
It will cache roughly 1000 json schemas. The cache size can be changed
using the `VLLM_XGRAMMAR_CACHE_MB` environment variable.

The security vulnerability was reported here:
GHSA-389x-67px-mjg3

Signed-off-by: Russell Bryant <[email protected]>
@russellb russellb requested a review from mgoin as a code owner April 8, 2025 19:59
@github-actions
Copy link

github-actions bot commented Apr 8, 2025

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix

@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 8, 2025
@mgoin mgoin enabled auto-merge (squash) April 8, 2025 20:38
@vllm-bot vllm-bot merged commit cb84e45 into vllm-project:main Apr 9, 2025
83 of 86 checks passed
yma11 pushed a commit to yma11/vllm that referenced this pull request Apr 16, 2025
yangw-dev pushed a commit to yangw-dev/vllm that referenced this pull request Apr 21, 2025
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Apr 29, 2025
lk-chen pushed a commit to lk-chen/vllm that referenced this pull request Apr 29, 2025
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
yma11 pushed a commit to yma11/vllm that referenced this pull request Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build ready ONLY add when PR is ready to merge/full CI is needed structured-output v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants