cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.35.0, cpp-httplib (httplib.h) does not enforce Server::setpayloadmax_length() on the decompressed request body when using HandlerWithContentReader (streaming ContentReader) with Content-Encoding: gzip (or other supported encodings). A small compressed payload can expand beyond the configured payload limit and be processed by the application, enabling a payload size limit bypass and potential denial of service (CPU/memory exhaustion). This vulnerability is fixed in 0.35.0.
{
"cwe_ids": [
"CWE-400",
"CWE-409"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28435.json",
"cna_assigner": "GitHub_M"
}{
"cpe": "cpe:2.3:a:yhirose:cpp-httplib:*:*:*:*:*:*:*:*",
"source": [
"CPE_RANGE",
"REFERENCES"
],
"extracted_events": [
{
"introduced": "0"
},
{
"fixed": "0.35.0"
}
]
}"2026-07-22T03:08:50Z"
[
{
"signature_type": "Function",
"target": {
"file": "httplib.h",
"function": "read_content"
},
"deprecated": false,
"source": "https://github.com/yhirose/cpp-httplib/commit/c99d7472b5cf4869d3897b9afc9792063a3d15a8",
"id": "CVE-2026-28435-29ab28dd",
"signature_version": "v1",
"digest": {
"function_hash": "74746730314336700382392421616361087673",
"length": 1376.0
}
},
{
"signature_type": "Function",
"target": {
"file": "httplib.h",
"function": "Server::routing"
},
"deprecated": false,
"source": "https://github.com/yhirose/cpp-httplib/commit/c99d7472b5cf4869d3897b9afc9792063a3d15a8",
"id": "CVE-2026-28435-797167f0",
"signature_version": "v1",
"digest": {
"function_hash": "3569740634388511840270561711140388394",
"length": 2190.0
}
},
{
"signature_type": "Function",
"target": {
"file": "httplib.h",
"function": "prepare_content_receiver"
},
"deprecated": false,
"source": "https://github.com/yhirose/cpp-httplib/commit/c99d7472b5cf4869d3897b9afc9792063a3d15a8",
"id": "CVE-2026-28435-9b30a385",
"signature_version": "v1",
"digest": {
"function_hash": "27401325142482852988380135752401769151",
"length": 924.0
}
},
{
"signature_type": "Line",
"target": {
"file": "httplib.h"
},
"deprecated": false,
"source": "https://github.com/yhirose/cpp-httplib/commit/c99d7472b5cf4869d3897b9afc9792063a3d15a8",
"id": "CVE-2026-28435-bcea864b",
"signature_version": "v1",
"digest": {
"line_hashes": [
"336620093775998130083204534146315144902",
"48261278978696573782838737954150987740",
"25263993843790355181074608904646098856",
"270565861836672539415351342119216784964",
"307733686717758452394557357153091473703",
"241423657130170861817757171211232425161",
"277223009612079348722281460193068094464",
"289645906111598587169901904179132149177",
"288441847406440607085773995130574482900",
"6154085008139808168913825350636784842",
"254843035028795877504312647447110684640",
"48100023920598998605003155898859628559",
"61000319865907416719250901747454429058",
"164609337165507433469985209426698622152",
"323323656031063368219382194435717382538",
"339885592849685253453127287063162146111",
"229080025159869799351818857383716339213",
"315596621814371842598799807411962157247",
"299917188554656618663061553949547970981",
"298801253700645922171765926966072659129",
"24172106091241432159952864198178353426",
"698028545424733854233987376183115324",
"83842166720811206405484969212492004838",
"79548144836350619236071304504736482096",
"274222254423662415877052249091548526598",
"274065380976258011280917651245620557561",
"309819496877884115803626941510040776953",
"170138664843069500949910245824311119350",
"227414381486183759363930604017565111540",
"246584266086112446949006322472394906663",
"61114654632616001000626608648672254879",
"295885261486842304824203782371919549249",
"131809600914814201549906272221481473991",
"60637104013833694847248289859978752876",
"253307259574145663736606345047614567188",
"234472319674310582768617042425634500812",
"57909769051648067177424741902096300191",
"229854370268696068680560460278661675998",
"329748775302257267944651610129827526663",
"7597105729796335360767048818985228252",
"150938064528720896682108233729733324695",
"259634372513854527504924369745077623030",
"88555999646887882443298128630321814354",
"133103455409917410925821273976952262082",
"182661680406452625961725031580022317777",
"47169067705431600468176616088221256930",
"153875378108037217357820481687654368032",
"257709864409495343765777771396199601810",
"163729283931957104749321934314328942761",
"139785599167853663183507136896951074467",
"312444211110648884581367336570039970070",
"233603659413596956999586450613374146592",
"156962228014884729667527118855238316490",
"101009091887649194001364542811491840217",
"197040198173911966444105035093462691291",
"199777601485856131570416260161335561920",
"117034669642092749885021784003669868720",
"136618464789765519394256895721515826112",
"161809727313611182309148393775525695883",
"118899281503478189466977023624133197343",
"260412467073191681294758342173702895970",
"331506801141463152245080050964869645059",
"76342194727321959629312426244182888009",
"223806271234802523021061016499458327744",
"180268995372409327452520676763574733498"
],
"threshold": 0.9
}
},
{
"signature_type": "Line",
"target": {
"file": "test/test.cc"
},
"deprecated": false,
"source": "https://github.com/yhirose/cpp-httplib/commit/c99d7472b5cf4869d3897b9afc9792063a3d15a8",
"id": "CVE-2026-28435-db2566d3",
"signature_version": "v1",
"digest": {
"line_hashes": [
"314258632294440309735684983878683059517",
"21214091782338116108085564081410487219",
"324856385457370040346550676230505883529",
"254161945597284604992433239876287001107",
"114599813364296555088160024051460464000",
"11818806752357983553704969358398234908",
"230574403061835867794759007349882061150"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"target": {
"file": "test/test.cc",
"function": "TEST"
},
"deprecated": false,
"source": "https://github.com/yhirose/cpp-httplib/commit/c99d7472b5cf4869d3897b9afc9792063a3d15a8",
"id": "CVE-2026-28435-de877a74",
"signature_version": "v1",
"digest": {
"function_hash": "322006012403534972482415604374091314249",
"length": 995.0
}
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-28435.json"