Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-46527— cpp-httplib: Malicious `X-Forwarded-For` Under Trusted-Proxy Configuration Triggers Empty `vector::front()`, Leading to Undefined Behavior and Server Crash

Quick assessment

Affected
yhirose cpp-httplib
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

cpp-httplib是yhirose个人开发者的一款使用C++语言编写的HTTP/HTTPS服务器和客户端库。 cpp-httplib 0.44.0之前版本存在代码问题漏洞,该漏洞源于当服务器设置了非空可信代理列表时,攻击者可发送包含X-Forwarded-For标头的HTTP请求,其值解析为无效IP段,导致对空std::vector调用front(),可能造成进程异常终止。

AI Predicted 5.3 Difficulty: Easy EPSS 0.49% · P40

Affected Version Matrix 1

VendorProduct Version RangeStatus
yhirose cpp-httplib < 0.44.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-46527

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
cpp-httplib: Malicious `X-Forwarded-For` Under Trusted-Proxy Configuration Triggers Empty `vector::front()`, Leading to Undefined Behavior and Server Crash
Source: CVE Program / CVE List V5
Vulnerability Description
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.44.0, When the server has called Server::set_trusted_proxies() with a non-empty trusted-proxy list, an attacker can send an HTTP request that includes an X-Forwarded-For header whose value parses to no valid IP segments. The code path then executes get_client_ip(), which calls front() on an empty std::vector—undefined behavior in C++. On typical implementations this manifests as abnormal process termination (denial of service). With Sanitizers enabled, you get an explicit runtime diagnostic. This vulnerability is fixed in 0.44.0.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Source: CVE Program / CVE List V5
Vulnerability Type
空指针解引用
Source: CVE Program / CVE List V5
Vulnerability Title
cpp-httplib 代码问题漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
cpp-httplib是yhirose个人开发者的一款使用C++语言编写的HTTP/HTTPS服务器和客户端库。 cpp-httplib 0.44.0之前版本存在代码问题漏洞,该漏洞源于当服务器设置了非空可信代理列表时,攻击者可发送包含X-Forwarded-For标头的HTTP请求,其值解析为无效IP段,导致对空std::vector调用front(),可能造成进程异常终止。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
yhirose cpp-httplib < 0.44.0 -

II. Public POCs for CVE-2026-46527

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-46527

请登录查看更多情报信息。

Vendor Advisories for CVE-2026-46527 (1)

Same Patch Batch · yhirose · 2026-05-29 · 3 CVEs total

CVE-2026-45372 9.9 CRITICAL cpp-httplib: HTTP header value percent-decoding in server-side `parse_header` enables CRLF
CVE-2026-45352 5.3 MEDIUM cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding

IV. Related Vulnerabilities

V. Comments for CVE-2026-46527

No comments yet


Leave a comment