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

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.33%, higher than 27% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-29T19:18:26.615Z
- Modified: 2026-07-22T06:10:00.170Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- yhirose cpp-httplib: < 0.44.0; before 0.44.0

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-hg3g-vrg8-578g> (exploit, mitigation, vendor-advisory)

## Sources

- CVE List: [CVE-2026-46527](https://www.cve.org/CVERecord?id=CVE-2026-46527), CVE Terms of Use, modified 2026-06-01
- NVD: [CVE-2026-46527](https://nvd.nist.gov/vuln/detail/CVE-2026-46527), Public domain, modified 2026-07-22

---

Page: https://cve.day/CVE-2026-46527 · Whole record: https://cve.day/CVE-2026-46527.json · Rebuilt by cve.day 2026-11-25T22:59:23.371Z
