Live data from Hacker News

"cat readme.txt" is not safe if you use iTerm2

blog.calif.io

81–90 of 197 posts

Re: "cat readme.txt" is not safe if you use iTerm2

#81
post #32

This is cool work, but it's also somewhat unsurprising: this is a recurring problem with fancy, richly-featured terminal apps. I think we had at least ten publicly reported vulns of this type in the past 15 years. We also had vulnerabilities in tools such as less, in text editors such as vim, etc. And notably, many of these are logic bugs - i.e., they are not alleviated by a rewrite to Rust. I don't know what to do w…

Well all these bugs (iTerm2’s, prompt injection, SQL injection, XSS) are one class of mistake — you sent out-of-band data in the same stream as the in-band data. If we can get that to raise a red flag with people (and agents), people won’t be trying to put control instructions alongside user content (without considering safeguards) as much.

> If we can get that to raise a red flag with people (and agents), people won’t be trying to put control instructions alongside user content (without considering safeguards) as much.

At a basic level there is no avoiding this. There is only one network interface in most machines and both the in-band and out-of-band data are getting serialized into it one way or another. See also WiFi preamble injection.

These things are inherently recursive. You can't even really have a single place where all the serialization happens. It's user data in JSON in an HTTP stream in a TLS record in a TCP stream in an IP packet in an ethernet frame. Then it goes into a SQL query which goes into a B-tree node which goes into a filesystem extent which goes into a RAID stripe which goes into a logical block mapped to a physical block etc. All of those have control data in the same stream under the hood.

The actual mistake is leaving people to construct the combined data stream manually rather than programmatically. Manually is concatenating the user data directly into the SQL query, programmatically is parameterized queries.

Re: "cat readme.txt" is not safe if you use iTerm2

#82
post #80

I'm tired of iTerm2 - ssh conductor - AI features almost forced on us until the community complained - clickable links I just want a dumb, reliable terminal. Is that too much to ask?

Use terminal.app. Since tahoe it supports 24bit colour and has key combos for the most common features.

Re: "cat readme.txt" is not safe if you use iTerm2

#83

> At the time of writing, the fix has not yet reached stable releases. Why was this disclosed before the hole was patched in the stable release? It's only been 18 days since the bug was reported to upstream, which is much shorter than typical vulnerability disclosure deadlines. The upstream commit ( https://github.com/gnachman/iTerm2/commit/a9e745993c2e2cbb30... ) has way less information than this blog post, so I th…

There exist some disclosure embargo exceptions when you believe the vulnerability is being used in wild or when the vulnerability fix is already released publicly (such as git commit), which makes it possible to produce exploit quickly. In this case it is preferred by the community to publish vulnerability.

Re: "cat readme.txt" is not safe if you use iTerm2

#85

Earlier quoted context omitted.

[flagged]

> It’s quite impossible. Do you know all about 1970s operating systems? Why do you find it hard to believe that a loop deleting backwards from the buffer wouldn't, say, zero out the stack frame and then a function return crashes it? > Was it identified as a bug or vulnerability? What difference does that make? It crashed the -10. It was reported. > What OS, even? The TOPS-10 operating system, or its predecessor. I do…

[flagged]

Re: "cat readme.txt" is not safe if you use iTerm2

#88
I would prefer if these would not happen but that is the price for having a rich terminal. I donate to the author of iterm a small sum every month, I wish if he focused on the security for a while and tightened some bugs instead of pushing into AI related features

Re: "cat readme.txt" is not safe if you use iTerm2

#89
post #32

This is cool work, but it's also somewhat unsurprising: this is a recurring problem with fancy, richly-featured terminal apps. I think we had at least ten publicly reported vulns of this type in the past 15 years. We also had vulnerabilities in tools such as less, in text editors such as vim, etc. And notably, many of these are logic bugs - i.e., they are not alleviated by a rewrite to Rust. I don't know what to do w…

Well all these bugs (iTerm2’s, prompt injection, SQL injection, XSS) are one class of mistake — you sent out-of-band data in the same stream as the in-band data. If we can get that to raise a red flag with people (and agents), people won’t be trying to put control instructions alongside user content (without considering safeguards) as much.

See also 2600Hz...

Re: "cat readme.txt" is not safe if you use iTerm2

#90
post #69

Earlier quoted context omitted.

X11 or any network transparent graphics protocol doesn't solve the problems that a terminal solves. how do you pipe data through multiple applications in one command using a GUI for example? nobody has been able to solve that in a practical way yet. what we really want is being able to pipe semantic data that can be output to some kind of graphical device/interface that uses that semantic information to display the d…

> how do you pipe data through multiple applications in one command using a GUI for example? nobody has been able to solve that in a practical way yet. How about Arcan? https://arcan-fe.com/2021/04/12/introducing-pipeworld/

that looks pretty good, except i want to be able to use the pipes on a remote machine, yet still have the output graphically represented locally.
Post reply on HN