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.
cpp-httplib versions before 0.44.0 contain a null pointer dereference vulnerability in the X-Forwarded-For header parsing when trusted proxies are configured, allowing attackers to crash the server via malformed headers. This denial of service vulnerability affects applications using the library's proxy trust feature.
تحتوي مكتبة cpp-httplib على ثغرة في معالجة رؤوس HTTP عندما يتم تفعيل قائمة الوكلاء الموثوقين. عند استقبال طلب يحتوي على رأس X-Forwarded-For بصيغة غير صحيحة، يحاول الكود الوصول إلى عنصر في متجه فارغ مما يسبب سلوكاً غير محدد. هذا يؤدي عادة إلى إيقاف العملية بشكل غير طبيعي (رفض الخدمة).
مكتبة cpp-httplib الإصدارات السابقة للإصدار 0.44.0 تحتوي على ثغرة في معالجة رؤوس X-Forwarded-For عند تفعيل قائمة الوكلاء الموثوقين، مما يسمح بإيقاف الخادم. هذه الثغرة تؤثر على التطبيقات التي تستخدم ميزة الثقة بالوكلاء.
Update cpp-httplib to version 0.44.0 or later immediately. If immediate patching is not possible, disable the Server::set_trusted_proxies() feature or implement input validation for X-Forwarded-For headers at the reverse proxy level.
قم بتحديث مكتبة cpp-httplib إلى الإصدار 0.44.0 أو أحدث فوراً. إذا لم يكن التحديث ممكناً، قم بتعطيل ميزة Server::set_trusted_proxies() أو طبق التحقق من صحة رؤوس X-Forwarded-For على مستوى الوكيل العكسي.