This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mghttpupload() method may enable attackers to write files to arbitrary locations outside the designated target folder.
[
{
"source": "https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945",
"signature_type": "Line",
"target": {
"file": "mongoose.c"
},
"id": "CVE-2022-25299-384fc369",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"242706033282067176875032425508032888864",
"99522183213085504313786174125419876320",
"317607507457042687038877028356137111401",
"333692189807639914897787362839627623813",
"233865274326001107318949442572987913309",
"221254706629978215518853743110690491273",
"253319027323112190251501714670312356228",
"216538699964804043248640641326933649494",
"244608069674255244487288380326870337055",
"260246318888716113391930882121398533345",
"297272436952712233725021059878684268872",
"25363224782478370495762222898064946957",
"163909099563252246648925565846780879728",
"293169514882191368702607043720044341984",
"102129296967832871668598717709511254046",
"112819087028156993108012246646245345603",
"101821142596263531984442375264151164907",
"261717293051684845709397823176983799782",
"228130189183380133144193134927040524517",
"174402573558153142600198445885969578150",
"316634947057275655371304392957716982165",
"298331221646344776840071252632452039089",
"51519848797132890115430913520659695192",
"94585454980982654502483191906239126992",
"81666697063671350821902100494798519433",
"23964437094381691308194720730542555578",
"305407463024304548130196606906410878762",
"38414022540808156823982743711661729470",
"62657882478922673139893870355193611787",
"88850435843307456768886303461010071700",
"106490766253083496260963657830660064020",
"291678104855126962159420652916814432635",
"88337735380769454933221982902538839929"
]
}
},
{
"source": "https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945",
"signature_type": "Function",
"target": {
"function": "test_http_server",
"file": "test/unit_test.c"
},
"id": "CVE-2022-25299-d3c83efa",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 6870.0,
"function_hash": "299142579153512652660395765520501226188"
}
},
{
"source": "https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945",
"signature_type": "Line",
"target": {
"file": "src/http.c"
},
"id": "CVE-2022-25299-da9c7b66",
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"242706033282067176875032425508032888864",
"99522183213085504313786174125419876320",
"317607507457042687038877028356137111401",
"333692189807639914897787362839627623813",
"233865274326001107318949442572987913309",
"221254706629978215518853743110690491273",
"253319027323112190251501714670312356228",
"216538699964804043248640641326933649494",
"244608069674255244487288380326870337055",
"260246318888716113391930882121398533345",
"297272436952712233725021059878684268872",
"25363224782478370495762222898064946957",
"163909099563252246648925565846780879728",
"293169514882191368702607043720044341984",
"102129296967832871668598717709511254046",
"112819087028156993108012246646245345603",
"101821142596263531984442375264151164907",
"261717293051684845709397823176983799782",
"228130189183380133144193134927040524517",
"174402573558153142600198445885969578150",
"316634947057275655371304392957716982165",
"298331221646344776840071252632452039089",
"51519848797132890115430913520659695192",
"94585454980982654502483191906239126992",
"81666697063671350821902100494798519433",
"23964437094381691308194720730542555578",
"305407463024304548130196606906410878762",
"38414022540808156823982743711661729470",
"62657882478922673139893870355193611787",
"88850435843307456768886303461010071700",
"106490766253083496260963657830660064020",
"291678104855126962159420652916814432635",
"88337735380769454933221982902538839929"
]
}
},
{
"source": "https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945",
"signature_type": "Function",
"target": {
"function": "mg_http_upload",
"file": "mongoose.c"
},
"id": "CVE-2022-25299-e80b1150",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 939.0,
"function_hash": "94260302717059400505012761633974380900"
}
},
{
"source": "https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945",
"signature_type": "Function",
"target": {
"function": "mg_http_upload",
"file": "src/http.c"
},
"id": "CVE-2022-25299-f3a27d8f",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 939.0,
"function_hash": "94260302717059400505012761633974380900"
}
}
]