Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-29076: CWE-674: Uncontrolled Recursion in yhirose cpp-httplib

0
Medium
VulnerabilityCVE-2026-29076cvecve-2026-29076cwe-674cwe-1333
Published: Sat Mar 07 2026 (03/07/2026, 16:08:56 UTC)
Source: CVE Database V5
Vendor/Project: yhirose
Product: cpp-httplib

Description

cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to version 0.37.0, cpp-httplib uses std::regex (libstdc++) to parse RFC 5987 encoded filename* values in multipart Content-Disposition headers. The regex engine in libstdc++ implements backtracking via deep recursion, consuming one stack frame per input character. An attacker can send a single HTTP POST request with a crafted filename* parameter that causes uncontrolled stack growth, resulting in a stack overflow (SIGSEGV) that crashes the server process. This issue has been patched in version 0.37.0.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/14/2026, 19:54:41 UTC

Technical Analysis

CVE-2026-29076 concerns an uncontrolled recursion vulnerability in the cpp-httplib library, a widely used C++11 single-header HTTP/HTTPS client and server library. Prior to version 0.37.0, cpp-httplib uses the std::regex implementation from libstdc++ to parse RFC 5987 encoded filename* parameters within multipart Content-Disposition headers. The regex engine in libstdc++ relies on backtracking implemented via deep recursion, where each input character consumes one stack frame. An attacker can craft a malicious HTTP POST request containing a filename* parameter designed to cause excessive recursion depth in the regex engine. This leads to uncontrolled stack growth, culminating in a stack overflow and a segmentation fault (SIGSEGV) that crashes the server process. The vulnerability does not affect confidentiality or integrity but impacts availability by causing denial of service. Exploitation requires no privileges or user interaction but demands precise input crafting, making the attack complexity high. The vulnerability is classified under CWE-674 (Uncontrolled Recursion) and CWE-1333 (Improper Handling of Exceptional Conditions). The issue has been addressed in cpp-httplib version 0.37.0 by presumably changing the parsing approach or regex usage to prevent deep recursion. No public exploits have been reported to date.

Potential Impact

The primary impact of CVE-2026-29076 is denial of service due to server process crashes triggered by stack overflow. Organizations using vulnerable versions of cpp-httplib in their HTTP/HTTPS servers or clients may experience service interruptions if targeted by crafted HTTP POST requests exploiting this vulnerability. This can degrade service availability, disrupt business operations, and potentially lead to cascading failures if the affected service is critical or part of a larger system. Although the vulnerability does not allow data disclosure or modification, repeated exploitation could be used as part of a broader attack to degrade system reliability or distract incident response teams. The impact is particularly significant for high-availability environments or internet-facing services where attackers can send arbitrary HTTP requests. Since cpp-httplib is a popular lightweight library embedded in various C++ applications, the scope of affected systems can be broad, especially in industries relying on custom or embedded HTTP services.

Mitigation Recommendations

To mitigate CVE-2026-29076, organizations should immediately upgrade all instances of cpp-httplib to version 0.37.0 or later, where the vulnerability is patched. If upgrading is not immediately feasible, consider implementing input validation or filtering at the network perimeter to detect and block HTTP POST requests containing suspicious or unusually long filename* parameters in multipart Content-Disposition headers. Employ web application firewalls (WAFs) with custom rules targeting malformed multipart requests to reduce exposure. Additionally, monitor server logs for repeated crashes or segmentation faults related to HTTP POST handling, which may indicate exploitation attempts. Developers should review their use of regex parsing for multipart headers and consider alternative parsing methods that do not rely on recursive backtracking. Finally, incorporate fuzz testing and static analysis in the development lifecycle to detect similar uncontrolled recursion issues proactively.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-03T20:51:43.483Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69ac4f4bc48b3f10ffae7aba

Added to database: 3/7/2026, 4:16:11 PM

Last enriched: 3/14/2026, 7:54:41 PM

Last updated: 4/21/2026, 12:11:24 PM

Views: 106

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses