CVE-2020-5212 NetHack MENUCOLOR configuration file option is subject to a buffer overflow
An attacker can trigger a buffer overflow via a long MENUCOLOR config value, leading to code execution or privilege escalation on suid/sgid systems.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2020-5212?
CVE-2020-5212 is a medium-severity memory corruption vulnerability in NetHack, published on 28 Jan 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
In NetHack before 3.6.5, an extremely long value for the MENUCOLOR configuration file 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 upload their own configuration files. Users should upgrade to NetHack 3.6.5.
Weakness: CWE-120
Which versions are affected by CVE-2020-5212?
It affects 1 product.
Products include Nethack Nethack.
How do I fix CVE-2020-5212?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2020-5212 being exploited?
There is no known exploitation of CVE-2020-5212 in the wild and no public exploit code.
Other vulnerabilities in NetHack
- CVE-2019-19905 Memory corruption in n/a
- CVE-2023-24809 NetHack Call command buffer overflow
- CVE-2020-5209 NetHack command line parsing of options starting with -de and -i is subject to a buffer overflow
- CVE-2020-5210 NetHack command line -w option parsing is subject to a buffer overflow
- CVE-2020-5211 NetHack AUTOCOMPLETE configuration file option is subject to a buffer overflow
Sources
Also known as DEBIAN-CVE-2020-5212, GHSA-g89f-m829-4m56, UBUNTU-CVE-2020-5212.