> xterm through Patch #365 allows remote attackers to cause a denial of service (segmentation fault) or possibly have unspecified other impact via a crafted UTF-8 character sequence.
https://access.redhat.com/security/cve/CVE-2021-27135 has more information, explaining that “a specially crafted sequence of combining characters causes an out of bounds write leading to arbitrary code execution.”, and that:
> This vulnerability can be mitigated by disabling UTF-8 support in XTerm configuration. An entry such as "XTerm.vt100.utf8: false" in Xresources will disable UTF-8. This can be set as a system default in /etc/X11/Xresources, or per-user in ~/.Xresources. > > Note that this setting can still be overridden if xterm is invoked with the "-u8" command line option, so the mitigation may not protect all use cases.
Xterm doesn’t get a lot of reports, but a CVSS 9.6 is a doozy. An attack vector might look like:
- Upload a package to PyPI or Node.js that emits specially crafted console output as part of its installer.
- Profit.
From a previous HN story (https://news.ycombinator.com/item?id=11248847) UTF-8 support is enabled by default on OpenBSD, and probably all other distros by now.