Description
nethack 3.4.0 and earlier installs certain setgid binaries with insecure permissions, which allows local users to gain privileges by replacing the original binaries with malicious code.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | nethack | 3.4.1-1 | — |
| Debian 14 | slashem | 0.0.6E4F8-6 | — |
| Debian 13 | nethack | 3.4.1-1 | — |
| Debian 13 | slashem | 0.0.6E4F8-6 | — |
| Debian 12 | nethack | 3.4.1-1 | — |
| Debian 12 | slashem | 0.0.6E4F8-6 | — |
| Debian 3.0 | jnethack | 1.1.5-11woody2 | DSA-316-3 |
| Debian 3.0 | nethack | 3.4.0-3.0woody3 | DSA-316-1 |
Advisories 2
- DSA-316-3 jnethack - buffer overflow, incorrect permissions Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-316-1 nethack - buffer overflow, incorrect permissions Debian Security (DSA / DLA) · Mar 9, 2026
References
- DSA-316 vendor-advisory