XPath Boolean Expression DoS Vulnerability
A vulnerability in the antchfx/xpath package allows for denial of service via CPU exhaustion by exploiting boolean expressions that evaluate to true, leading to an infinite loop.
A denial-of-service vulnerability exists in the antchfx/xpath Go package, specifically in versions prior to 1.3.6. The vulnerability, identified as CVE-2026-32287, stems from the way the logicalQuery.Select function handles boolean expressions. When expressions that always evaluate to true, such as “1=1” or “true()”, are used as top-level selectors, they can trigger an infinite loop within the function. This results in the affected system consuming 100% of CPU resources, effectively denying service to legitimate users. The vulnerability was published on March 29, 2026, and patched in version 1.3.6.
Attack Chain
- An attacker crafts a malicious XPath expression containing a boolean expression that always evaluates to true, such as “1=1” or “true()”.
- The attacker sends this malicious XPath expression to an application that uses the vulnerable
antchfx/xpathpackage. - The application parses the XPath expression using the
logicalQuery.Selectfunction. - Due to the nature of the expression, the
logicalQuery.Selectfunction enters an infinite loop. - The infinite loop consumes excessive CPU resources.
- The application becomes unresponsive due to CPU exhaustion.
- Legitimate users are unable to access the application.
- The system experiences a denial of service.
Impact
Successful exploitation of this vulnerability leads to a denial-of-service condition. An affected server or application becomes unresponsive, impacting all users who rely on the service. While the vulnerability does not directly compromise data confidentiality or integrity, it can severely disrupt operations. The number of potential victims depends on the scope and deployment of applications utilizing the vulnerable antchfx/xpath package.
Recommendation
- Upgrade the
antchfx/xpathpackage to version 1.3.6 or later to patch CVE-2026-32287. - Deploy the Sigma rule
Detect XPath Boolean Expression DoS Attemptto identify attempts to exploit this vulnerability. - Monitor web server logs for suspicious XPath expressions, particularly those containing “1=1” or “true()”, using the
Web Server Log - XPath Boolean ExpressionSigma rule.
Detection coverage 2
Detect XPath Boolean Expression DoS Attempt
highDetects attempts to trigger the XPath boolean expression denial-of-service vulnerability by identifying suspicious XPath expressions.
Web Server Log - XPath Boolean Expression
mediumDetects potentially malicious XPath boolean expressions in web server logs.
Detection queries are kept inside the platform. Get full rules →