Bug 2393665 (CVE-2025-58446)

Summary: CVE-2025-58446 xgrammar: xgrammar vulnerable to denial of service by huge enum grammar
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: alinfoot, bbrownin, dtrifiro, rbryant, weaton
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A vulnerability was found in the xgrammar library, version 0.1.23, where the flaw is an algorithmic complexity vulnerability located in the grammar optimizer, a new component introduced in this specific version. This vulnerability occurs because the optimizer is highly inefficient when processing exceptionally large grammars (e.g., those exceeding 100,000 characters), when the library receives such an input, the flawed optimization algorithm causes the parsing process to consume disproportionate CPU resources, effectively blocking the application for several minutes. An attacker can exploit this by sending a malicious grammar to any service that utilizes the vulnerable xgrammar library leads to the performance bottleneck and cause a Denial of Service (DoS).
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-09-06 20:01:16 UTC
xgrammar is an open-source library for efficient, flexible, and portable structured generation. A grammar optimizer introduced in 0.1.23 processes large grammars (>100k characters) at very low rates, and can be used for DOS of model providers. This issue is fixed in version 0.1.24.