CRLF Injection Affecting yhirose/cpp-httplib package, versions [,0.5.9)
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.11% (46th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-UNMANAGED-YHIROSECPPHTTPLIB-2366507
- published 26 Jan 2022
- disclosed 12 Apr 2020
- credit shouc
Introduced: 12 Apr 2020
CVE-2020-11709 Open this link in a new tabHow to fix?
Upgrade yhirose/cpp-httplib
to version 0.5.9 or higher.
Overview
Affected versions of this package are vulnerable to CRLF Injection due to not filtering \r\n
in parameters passed into the set_redirect
and set_header
functions.
PoC
#include "cpp-httplib/httplib.h"
using namespace httplib;
int main() {
Server svr;
svr.Get("/1", [](const Request& req, Response& res) {
res.set_redirect("1\r\nSet-Cookie: a=1");
});
svr.Get("/2", [](const Request& req, Response& res) {
res.set_header("a", "1\r\nSet-Cookie: a=1");
});
svr.listen("localhost", 3000);
}
References
CVSS Scores
version 3.1