Skip to content
Memory corruption Write-up Advanced

CVE-2021-27135: xterm flaw may allow remote code execution, CVSS 9.6

xterm before Patch #366 mishandles a crafted UTF-8 combining character sequence, which can crash the terminal with a segmentation fault or possibly allow arbitrary code execution. The text does not explain the mechanism beyond the crafted character sequence.

nvd.nist.gov

Published on nvd.nist.gov

The original lives on nvd.nist.gov

We do not hold its text, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a memory-handling bug in xterm's parsing or rendering of UTF-8 combining character sequences, fixed in Patch #366.

Impact

An attacker could crash xterm, and the text says they could possibly execute arbitrary code, though it does not demonstrate this.

What the attacker needed

Crafted UTF-8 combining character sequence; victim views the sequence in xterm

The fix

It was fixed in xterm Patch #366, and distributions shipped patched packages.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

xterm is a terminal emulator, the program that shows a text window where you type commands. A combining character is an accent mark that is meant to be drawn on top of the previous letter. The text says a specially crafted sequence of these characters could crash xterm, and possibly let an attacker run their own code, but it gives no detail on how.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.