# CVE-2020-5210: NetHack command line -w option parsing is subject to a buffer overflow

- Severity: Medium 5.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L`
- 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.80%, higher than 57% of CVEs (2026-12-01)
- Published: 2020-01-28T17:50:14.000Z
- Modified: 2026-06-17T03:21:01.900Z
- Weaknesses: CWE-120
- Assigned by: GitHub_M

## Description

In NetHack before 3.6.5, an invalid argument to the -w command line option can cause a buffer overflow resulting in a crash or remote code execution/privilege escalation. This vulnerability affects systems that have NetHack installed suid/sgid and shared systems that allow users to influence command line options. Users should upgrade to NetHack 3.6.5.

(As written by CVE List.)

## Affected

- NetHack NetHack: < 3.6.5; before 3.6.5

## Every score

- GitHub_M: CVSS:3.1 5.0 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.6 Medium `AV:L/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/NetHack/NetHack/security/advisories/GHSA-v5pg-hpjg-9rpp> (third-party-advisory)
- <https://github.com/NetHack/NetHack/commit/f3def5c0b999478da2d0a8f0b6a7c370a2065f77> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2020-5210 · Whole record: https://cve.day/CVE-2020-5210.json · Rebuilt by cve.day 2026-11-25T22:57:50.702Z
