{"id":"UBUNTU-CVE-2022-25299","details":"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.","modified":"2025-10-24T04:53:31Z","published":"2022-02-18T13:15:00Z","upstream":["CVE-2022-25299"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-25299"},{"type":"REPORT","url":"https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945"},{"type":"REPORT","url":"https://snyk.io/vuln/SNYK-UNMANAGED-CESANTAMONGOOSE-2404180"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-25299"}],"affected":[{"package":{"name":"phantomjs","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/phantomjs@2.1.1+dfsg-1?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.0-1","2.0.0+dfsg-1","2.1.1+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.1.1+dfsg-1","binary_name":"phantomjs"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25299.json"}},{"package":{"name":"phantomjs","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/phantomjs@2.1.1+dfsg-2?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.1+dfsg-2"],"ecosystem_specific":{"binaries":[{"binary_version":"2.1.1+dfsg-2","binary_name":"phantomjs"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25299.json"}},{"package":{"name":"phantomjs","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/phantomjs@2.1.1+dfsg-2ubuntu1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.1+dfsg-2","2.1.1+dfsg-2ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.1.1+dfsg-2ubuntu1","binary_name":"phantomjs"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-25299.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"},{"type":"Ubuntu","score":"medium"}]}