# CVE-2022-21230: Information Exposure

- Severity: Medium 5.5 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- 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): 0.30%, higher than 24% of CVEs (2026-12-01)
- Published: 2022-05-01T15:20:21.538Z
- Modified: 2026-06-17T04:25:49.200Z
- Assigned by: snyk

## Description

This affects all versions of package org.nanohttpd:nanohttpd. Whenever an HTTP Session is parsing the body of an HTTP request, the body of the request is written to a RandomAccessFile when the it is larger than 1024 bytes. This file is created with insecure permissions that allow its contents to be viewed by all users on the host machine. **Workaround:** Manually specifying the -Djava.io.tmpdir= argument when launching Java to set the temporary directory to a directory exclusively controlled by the current user can fix this issue.

(As written by CVE List.)

## Affected

- org.nanohttpd:nanohttpd: before unspecified
- nanohttpd nanohttpd: up to 2.3.1

## Every score

- snyk: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 2.1 Low `AV:L/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://snyk.io/vuln/SNYK-JAVA-ORGNANOHTTPD-2422798> (third-party-advisory)
- <https://github.com/NanoHttpd/nanohttpd/blob/efb2ebf85a2b06f7c508aba9eaad5377e3a01e81/core/src/main/java/org/nanohttpd/protocols/http/tempfiles/DefaultTempFile.java%23L58> (broken-link)
- <https://github.com/NanoHttpd/nanohttpd/blob/efb2ebf85a2b06f7c508aba9eaad5377e3a01e81/core/src/main/java/org/nanohttpd/protocols/http/tempfiles/DefaultTempFileManager.java%23L60> (broken-link)
- <https://github.com/JLLeitschuh/security-research/security/advisories/GHSA-2r85-x9cf-8fcg> (third-party-advisory)

## Sources

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

---

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