--- cve: CVE-2026-137857 cna: Rapid7 credit: Jonah Burgess (Rapid7) severity: "High (Rapid7)" cvss_v3_1: "7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" cwe: "CWE-407" affected_versions: "10.1.0 through 10.1.22" fixed_versions: "No confirmed fix" --- # CVE-2026-137857: Pre-Authentication AutoDiscover CPU Exhaustion ## Summary AutoDiscover repeatedly searches nested XML subtrees before authentication, allowing a 304,175-byte request to consume several seconds of CPU and request-worker time. A request wave caused both public and authenticated requests to time out. ## Prerequisites and Scope AutoDiscover is a core public HTTPS/443 route. An upstream structural or request-body limit can block the payload. ## Technical Analysis ### AutoDiscover performs quadratic descendant searches before Basic authentication `AutoDiscoverServlet.java`'s `doPost()` processes the request body and performs authentication in this order: ```java byte[] reqBytes = null; reqBytes = ByteUtil.getContent((InputStream)req.getInputStream(), (int)req.getContentLength()); // ... empty-body handling omitted ... String content = new String(reqBytes, "UTF-8"); // ... request logging omitted ... String email = null; String responseSchema = null; try { DocumentBuilderFactory docBuilderFactory = AutoDiscoverServlet.makeDocumentBuilderFactory(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse(new InputSource(new StringReader(content))); NodeList nList = doc.getElementsByTagName("Request"); // [0] all descendant Requests for (int i = 0; i < nList.getLength(); ++i) { Node node = nList.item(i); if (node.getNodeType() != 1) continue; Element element = (Element)node; email = AutoDiscoverServlet.getTagValue("EMailAddress", element); // [1] first repeated subtree search responseSchema = AutoDiscoverServlet.getTagValue("AcceptableResponseSchema", element); // [2] second repeated subtree search if (email == null) { continue; } break; } } // ... parse errors and field validation omitted ... log.debug((Object)"Authenticating user"); Account acct = this.authenticate(req, resp, responseSchema); // [3] authentication after parsing ``` `[0]` returns every nested `Request`. `[1]` and `[2]` each call a descendant-wide search from the current element; authentication at `[3]` occurs only after that loop. ```java private static String getTagValue(String tag, Element element) { NodeList nlList = element.getElementsByTagName(tag).item(0).getChildNodes(); // [4] descendant-wide lookup Node nValue = nlList.item(0); return nValue.getNodeValue(); } ``` With `N` nested `Request` elements and the searched tags only beneath the deepest element, `[4]` scans subtrees of approximately `N`, `N-1`, and so on, twice. Element-valued tag contents make `getNodeValue()` return `null`, preventing the early break. This produces `O(N²)` traversal from an `O(N)` body before authentication. ## Exploitation PoC: [autodiscover_pre_auth_cpu_dos.py](../pocs/CVE-2026-137857/autodiscover_pre_auth_cpu_dos.py). The AutoDiscover request nests `Request` elements and places element-valued fields at the deepest level: ```xml ``` The PoC sends one request: ```shell python3 pocs/CVE-2026-137857/autodiscover_pre_auth_cpu_dos.py \ --target https://mail.lab.local \ --depth 4000 \ --insecure ``` The run returned: ``` [+] sent 76157 bytes at depth 4000: HTTP 400 after 0.230s ``` At depth 16,000, a 304,175-byte request took 3.2819 seconds; equal-size controls completed in 0.0519 and 0.0626 seconds. A 256-request wave caused 22 of 30 public homepage and 21 of 30 authenticated SOAP probes to time out; service recovered after the wave. ## Impact The AutoDiscover issue can saturate shared mailboxd CPU and request capacity before authentication, denying webmail, SOAP, REST and synchronization traffic. It scores [**7.5 High**](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). ## Patch Status No fixed release has been established through ZCS 10.1.22. ## Indicators of Compromise (IoCs) The [AutoDiscover investigation guide](../detections/authentication.md#autodiscover-exhaustion) describes the request, CPU and worker evidence needed to distinguish the exhaustion condition from ordinary authentication failures.