CVE-2026-62303 Details
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.
A denial-of-service vulnerability has been identified in Pistache, a high-performance REST toolkit for C++. The issue arises in versions 0.0.5 through 0.4.26, where the function 'SegmentTreeNode::sanitizeResource()' uses 'std::regex_replace()' to collapse consecutive slashes in resource URLs. This regular expression handling can be exploited by sending a path with a long run of slash characters, causing deep recursion that exhausts the stack and crashes the server process. The vulnerability can be triggered remotely if the application allows long request paths, such as by increasing the maximum request size or through a front end that forwards lengthy paths. Additionally, the issue can be exploited via direct router API calls with attacker-controlled route or resource strings.
A fix has been implemented in the Pistache repository, replacing the recursive regular-expression normalization with an iterative approach. However, as of the time of this publication, no official release containing this fix has been made.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 30, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/pistacheio/pistache/commit/935461352403696f3ca0dbb9a7de7d2609e7ce91 | [email protected] | Source CodeVendor |
| https://github.com/pistacheio/pistache/security/advisories/GHSA-q474-pqcp-gqm5 | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-400 | Uncontrolled Resource Consumption | [email protected] |
| CWE-674 | Uncontrolled Recursion | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Pistache | >= 0.0.5, <= master |
CPE
Remediation
| |
Change History
1 change record found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 30, 2026 | New CVE Received | [email protected] |
Volerion