# CVE-2022-25299: Arbitrary File Write

- Severity: Critical 9.8 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.39%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-02-18T12:55:21.998Z
- Modified: 2026-06-17T04:33:20.967Z
- Weaknesses: CWE-552
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- cesanta/mongoose: from unspecified before 7.6
- cesanta mongoose: before 7.6

## Every score

- snyk: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`

## References

- <https://snyk.io/vuln/SNYK-UNMANAGED-CESANTAMONGOOSE-2404180> (exploit, third-party-advisory)
- <https://github.com/cesanta/mongoose/commit/c65c8fdaaa257e0487ab0aaae9e8f6b439335945> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2022-25299](https://www.cve.org/CVERecord?id=CVE-2022-25299), CVE Terms of Use, modified 2024-09-16
- NVD: [CVE-2022-25299](https://nvd.nist.gov/vuln/detail/CVE-2022-25299), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-25299 · Whole record: https://cve.day/CVE-2022-25299.json · Rebuilt by cve.day 2026-11-25T22:58:09.742Z
