{"id":"CVE-2022-25299","aliases":["EUVD-2022-29986","GHSA-q66h-r8q8-x284","SNYK-UNMANAGED-CESANTAMONGOOSE-2404180","UBUNTU-CVE-2022-25299"],"status":"published","title":"Arbitrary File Write","description":"This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01394,"percentile":0.72579,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-552"],"published":"2022-02-18T12:55:21Z","modified":"2026-10-28T10:27:35Z","affected":[{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"phantomjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.0-1","2.0.0+dfsg-1","2.1.1+dfsg-1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"phantomjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.1+dfsg-2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"phantomjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.1+dfsg-2","2.1.1+dfsg-2ubuntu1"]}],"products":[{"vendor":"cesanta","product":"mongoose"}],"references":[{"url":"https://snyk.io/vuln/SNYK-UNMANAGED-CESANTAMONGOOSE-2404180","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","advisory","report"]},{"url":"https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25299","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-q66h-r8q8-x284"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25299.json","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-25299","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-25299","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2022-25299","title":"Arbitrary File Write","description":"This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.","status":"published","published":"2022-02-18T12:55:21.998Z","modified":"2024-09-16T17:52:54.754Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna"}],"updated_at":"2026-11-02T14:34:28.374916Z"}],"euvd":[{"id":"EUVD-2022-29986","description":"This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.","status":"published","published":"2022-02-18T12:55:21Z","modified":"2024-09-16T17:52:54Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T00:55:38.288771Z"}],"ghsa":[{"id":"GHSA-q66h-r8q8-x284","title":"This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during...","description":"This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.","status":"published","published":"2022-02-19T00:01:35Z","modified":"2023-02-03T05:06:11Z","cwes":["CWE-552"],"updated_at":"2026-11-02T14:53:51.237254Z"}],"nvd":[{"id":"CVE-2022-25299","description":"This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.","status":"published","published":"2022-02-18T13:15:08.383Z","modified":"2026-06-17T04:33:20.967Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-552"],"updated_at":"2026-11-02T14:07:12.155838Z"}],"osv":[{"id":"CVE-2022-25299","title":"Arbitrary File Write","description":"This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.","status":"published","published":"2022-02-18T12:55:21.998Z","modified":"2026-10-28T10:27:35.148634093Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:24.428403Z"},{"id":"UBUNTU-CVE-2022-25299","description":"This affects the package cesanta/mongoose before 7.6. The unsafe handling of file names during upload using mg_http_upload() method may enable attackers to write files to arbitrary locations outside the designated target folder.","status":"published","published":"2022-02-18T13:15:00Z","modified":"2025-10-24T04:53:31Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T16:53:53.13624Z"}]}}
