Bug 2565142 (CVE-2026-120420)

Summary: CVE-2026-120420 drools-drl-parser: uncontrolled recursion when parsing deeply nested parenthesised expressions leads to denial of service (StackOverflowError)
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dschmidt, jlanda, kshier, rbobbitt, simaishi, stcannon, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A denial-of-service vulnerability was found in the Drools DRL expression parser (org.drools:drools-drl-parser). The ANTLR4-generated DRL expression grammar parses parenthesised sub-expressions through mutually recursive descent rules with no limit on nesting depth. When a deeply nested parenthesised constraint expression (approximately 300-400 levels) is parsed, the parsing thread exhausts its stack and a java.lang.StackOverflowError is raised and propagates out of the parse call instead of being converted into a DroolsParserException. An actor able to supply a crafted DRL expression to an application that parses untrusted DRL can cause a denial of service.
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 2026-11-02 12:27:27 UTC
Drl10ExprParser.parse feeds the constraint text into the ANTLR4-generated DRL10Expressions grammar. Parenthesised sub-expressions are parsed by mutually recursive descent rules (unaryExpressionNotPlusMinus -> castExpression/primary/parExpression -> conditionalExpression ... shiftExpression/additiveExpression ...); each nesting level adds one set of grammar frames with no depth counter. At ~300-400 levels the parser thread exhausts its stack and a raw java.lang.StackOverflowError propagates out of Drl10ExprParser.parse (syntax errors are collected, but stack exhaustion is not converted into a DroolsParserException).