NULL pointer dereference in Cpp-httplib - CVE-2026-46527
Published: May 16, 2026
Vulnerability details
The vulnerability allows a remote attacker to cause a denial of service.
The vulnerability exists due to undefined behavior from calling front() on an empty std::vector in get_client_ip() when handling HTTP requests with a crafted X-Forwarded-For header under trusted-proxy configuration. A remote attacker can send a specially crafted request to cause a denial of service.
Only deployments that configure a non-empty trusted-proxy list are vulnerable.
Affected software
Fedora
openEuler
cpp-httplib
cpp-httplib-debuginfo
cpp-httplib-debugsource
cpp-httplib-devel
How to mitigate CVE-2026-46527
cpp-httplib - update to 0.46.0-1
cpp-httplib-debuginfo - update to 0.46.0-1
cpp-httplib-debugsource - update to 0.46.0-1
cpp-httplib-devel - update to 0.46.0-1
cpp-httplib - addressed in versions 0.48.0-1.el9, 0.48.0-1.el10_3, 0.48.0-1.fc43, 0.48.0-1.fc44