The issue arises from insufficient input validation in the bidirectional text-display and text-selection implementations. This allows a remote attacker to substitute the content of text documents using a specially crafted sequence of characters. The implementations in Terminal interpret directional override formatting characters differently, enabling the exploitation.