CVE-2026-32287
Infinite Loop in Go XPath Causes 100% CPU Usage
Publication date: 2026-03-26
Last updated on: 2026-04-21
Assigner: Go Project
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| antchfx | xpath | to 1.3.6 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-835 | The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. |
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring for processes using 100% CPU caused by the evaluation of Boolean XPath expressions such as "1=1" or "true()" in the affected Go package github.com/antchfx/xpath before version v1.3.6.
Specifically, detection involves identifying if the logicalQuery.Select function is triggered with these expressions, leading to an infinite loop.
While no explicit commands are provided, you can use system monitoring tools to detect high CPU usage by processes running this package, for example:
- Use top or htop on Linux to identify processes with 100% CPU usage.
- Use pstack or gdb to attach to the process and inspect stack traces to see if logicalQuery.Select or Expr.Evaluate functions are involved.
- Use strace or equivalent to monitor system calls if applicable.
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to upgrade the github.com/antchfx/xpath package to version v1.3.6 or later, where the vulnerability has been fixed.
Avoid using or processing Boolean XPath expressions that evaluate to true at the top-level selectors such as "1=1" or "true()" until the package is updated.
Monitor your systems for unusual CPU usage patterns that may indicate exploitation attempts.
Can you explain this vulnerability to me?
CVE-2026-32287 is a vulnerability in the Go package github.com/antchfx/xpath, specifically in the logicalQuery.Select function. When Boolean XPath expressions that always evaluate to true, such as "1=1" or "true()", are used as top-level selectors, they can cause an infinite loop.
This infinite loop leads to 100% CPU usage, effectively causing the application to hang or become unresponsive.
How can this vulnerability impact me? :
The vulnerability can cause a denial of service condition by making the affected application consume 100% CPU resources indefinitely.
This can degrade system performance, cause application crashes, or make services unavailable to legitimate users.