{"id":"CVE-2020-5209","aliases":["DEBIAN-CVE-2020-5209","EUVD-2020-26449","GHSA-fw72-r8xm-45p8","MGASA-2021-0077","UBUNTU-CVE-2020-5209"],"status":"published","title":"NetHack command line parsing of options starting with -de and -i is subject to a buffer overflow","description":"In NetHack before 3.6.5, unknown options starting with -de and -i 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.","severity":{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00803,"percentile":0.57136,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-120"],"published":"2020-01-28T17:50:19Z","modified":"2026-10-26T12:02:49Z","fixes":[{"ecosystem":"Debian:12","package":"nethack","fixed_in":["3.6.6-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"nethack","fixed_in":["3.6.6-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"nethack","fixed_in":["3.6.6-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"nethack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.6.6-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"nethack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.6.6-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"nethack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.6.6-1"}]}]},{"source":"osv","ecosystem":"Mageia:7","package":"nethack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.6.6-1.mga7"}]}],"bundled":8},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"nethack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.4.3-15","3.4.3-15build1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"nethack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.6.0-4"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"nethack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.6.1-1"]}],"products":[{"vendor":"nethack","product":"nethack"}],"references":[{"url":"https://github.com/NetHack/NetHack/commit/f3def5c0b999478da2d0a8f0b6a7c370a2065f77","tags":["x_refsource_MISC","x_transferred","Patch","fix","report"]},{"url":"https://github.com/NetHack/NetHack/security/advisories/GHSA-fw72-r8xm-45p8","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","report"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2020-5209","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2021-0077.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=26228","tags":["report"]},{"url":"https://nethack.org/v362/release.html","tags":["web"]},{"url":"https://nethack.org/v363/release.html","tags":["web"]},{"url":"https://nethack.org/v364/release.html","tags":["web"]},{"url":"https://nethack.org/v365/release.html","tags":["web"]},{"url":"https://nethack.org/v366/release.html","tags":["web"]},{"url":"https://www.nethack.org/security/CVE-2019-19905.html","tags":["advisory"]},{"url":"https://www.nethack.org/security/CVE-2020-5209.html","tags":["advisory"]},{"url":"https://www.nethack.org/security/CVE-2020-5210.html","tags":["advisory"]},{"url":"https://www.nethack.org/security/CVE-2020-5211.html","tags":["advisory"]},{"url":"https://www.nethack.org/security/CVE-2020-5212.html","tags":["advisory"]},{"url":"https://www.nethack.org/security/CVE-2020-5213.html","tags":["advisory"]},{"url":"https://www.nethack.org/security/CVE-2020-5214.html","tags":["advisory"]},{"url":"https://www.nethack.org/security/CVE-2020-5254.html","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2020-5209","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-5209","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2020-5209","title":"NetHack command line parsing of options starting with -de and -i is subject to a buffer overflow","description":"In NetHack before 3.6.5, unknown options starting with -de and -i 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.","status":"published","published":"2020-01-28T17:50:19Z","modified":"2024-08-04T08:22:08.881Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-120"],"updated_at":"2026-11-02T14:35:47.56691Z"}],"euvd":[{"id":"EUVD-2020-26449","description":"In NetHack before 3.6.5, unknown options starting with -de and -i 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.","status":"published","published":"2020-01-28T17:50:19Z","modified":"2024-08-04T08:22:08Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-03T03:08:07.28588Z"}],"nvd":[{"id":"CVE-2020-5209","description":"In NetHack before 3.6.5, unknown options starting with -de and -i 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.","status":"published","published":"2020-01-28T18:15:11.087Z","modified":"2026-06-17T03:21:01.783Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":4.6,"vector":"AV:L/AC:L/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-120"],"updated_at":"2026-11-02T14:05:53.837808Z"}],"osv":[{"id":"CVE-2020-5209","description":"In NetHack before 3.6.5, unknown options starting with -de and -i 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.","status":"published","published":"2020-01-28T18:15:11.087Z","modified":"2026-10-20T14:13:52.279023398Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:16.936975Z"},{"id":"DEBIAN-CVE-2020-5209","description":"In NetHack before 3.6.5, unknown options starting with -de and -i 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.","status":"published","published":"2020-01-28T18:15:11.087Z","modified":"2026-10-26T12:02:49.644212281Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:34.019707Z"},{"id":"UBUNTU-CVE-2020-5209","description":"In NetHack before 3.6.5, unknown options starting with -de and -i 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.","status":"published","published":"2020-01-28T18:15:00Z","modified":"2025-10-24T04:48:17Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L","level":"medium"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:25.179924Z"},{"id":"MGASA-2021-0077","title":"Updated nethack packages fix security vulnerabilities","description":"Updated nethack packages fix security vulnerabilities:\n\nNetHack 3.6.x before 3.6.4 is prone to a buffer overflow vulnerability when\nreading very long lines from configuration files. This affects systems that\nhave NetHack installed suid/sgid, and shared systems that allow users to\nupload their own configuration files (CVE-2019-19905).\n\nIn NetHack before 3.6.5, unknown options starting with -de and -i can cause\na buffer overflow resulting in a crash or remote code execution/privilege\nescalation. This vulnerability affects systems that have NetHack installed\nsuid/sgid and shared systems that allow users to influence command line\noptions (CVE-2020-5209).\n\nIn NetHack before 3.6.5, an invalid argument to the -w command line option\ncan cause a buffer overflow resulting in a crash or remote code\nexecution/privilege escalation. This vulnerability affects systems that have\nNetHack installed suid/sgid and shared systems that allow users to influence\ncommand line options (CVE-2020-5210).\n\nIn NetHack before 3.6.5, an invalid extended command in value for the\nAUTOCOMPLETE configuration file option can cause a buffer overflow resulting\nin a crash or remote code execution/privilege escalation. This vulnerability\naffects systems that have NetHack installed suid/sgid and shared systems\nthat allow users to upload their own configuration files (CVE-2020-5211).\n\nIn NetHack before 3.6.5, an extremely long value for the MENUCOLOR\nconfiguration file option can cause a buffer overflow resulting in a crash\nor remote code execution/privilege escalation. This vulnerability affects\nsystems that have NetHack installed suid/sgid and shared systems that allow\nusers to upload their own configuration files (CVE-2020-5212).\n\nIn NetHack before 3.6.5, too long of a value for the SYMBOL configuration\nfile option can cause a buffer overflow resulting in a crash or remote code\nexecution/privilege escalation. This vulnerability affects systems that have\nNetHack installed suid/sgid and shared systems that allow users to upload\ntheir own configuration files (CVE-2020-5213).\n\nIn NetHack before 3.6.5, detecting an unknown configuration file option can\ncause a buffer overflow resulting in a crash or remote code\nexecution/privilege escalation. This vulnerability affects systems that have\nNetHack installed suid/sgid and shared systems that allow users to upload\ntheir own configuration files (CVE-2020-5214).\n\nIn NetHack before 3.6.6, some out-of-bound values for the hilite_status\noption can be exploited (CVE-2020-5254).\n\nThe nethack package has been updated to version 3.6.6, fixing these issues\nand other bugs. See the upstream release notes for details.\n","status":"published","published":"2021-02-10T18:41:52Z","modified":"2026-04-16T04:42:35.79467705Z","updated_at":"2026-11-02T15:49:41.509337Z"}]}}
