CVE-2026-62303
Received Received - Intake

Stack Exhaustion in Pistache REST Toolkit via Path Normalization

Vulnerability report for CVE-2026-62303, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-30

Last updated on: 2026-10-30

Assigner: GitHub, Inc.

Description

Pistache is a high-performance REST toolkit written in C++. From 0.0.5 through 0.4.26, `SegmentTreeNode::sanitizeResource()` in `src/server/router.cc` uses `std::regex_replace()` with the `//+` expression to collapse consecutive slashes. With libstdc++, a path containing tens of thousands of consecutive slash characters can recurse deeply enough to exhaust the stack and crash the process. `Router::route()`, `Router::addRoute()` and `Router::removeRoute()` reach this normalization. Unauthenticated remote exploitation is conditional on a deployment allowing sufficiently long request paths, such as by increasing `Endpoint::Options::maxRequestSize()` above the default 4096-byte limit or forwarding long paths through a front end. Direct router API use is also affected when attacker-controlled route or resource strings reach the normalizer. Native builds reproduced a crash around 24,000 consecutive slashes, although the exact threshold depends on the stack and standard library; the demonstrated failure is stack exhaustion rather than uninitialized-memory use. A source fix replaces recursive regular-expression normalization with an iterative pass, but no containing repository release was verified as of time of publication.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-30
Last Modified
2026-10-30
Generated
2026-10-30
AI Q&A
2026-10-30
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
pistacheio pistache >= 0.0.5, <= 0.4.26

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-674 The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
CWE-400 The product does not properly control the allocation and maintenance of a limited resource.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Pistache versions 0.0.5 through 0.4.26 contain a stack exhaustion vulnerability in the path normalization function. The function uses a recursive regex replacement to collapse consecutive slashes in URLs, which can recurse deeply enough to exhaust the stack and crash the process when a path contains tens of thousands of consecutive slashes.

Detection Guidance

Detecting this vulnerability requires checking for crashes in Pistache applications when processing paths with many consecutive slashes. Monitor logs for stack overflow errors or process crashes. Test by sending requests with long paths containing repeated slashes to see if the system crashes.

Impact Analysis

An unauthenticated remote attacker could crash the Pistache server by sending a request with an extremely long path containing many consecutive slashes. This requires the server to allow long paths, either by default or through configuration changes like increasing maxRequestSize. The crash is a denial of service as the process terminates.

Mitigation Strategies

Apply the source fix by replacing recursive regex normalization with an iterative pass in src/server/router.cc. Alternatively, limit request path lengths by setting Endpoint::Options::maxRequestSize() to a lower value. Ensure front-end systems do not forward excessively long paths to Pistache.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-62303. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart