frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Mad Bugs: Vim vs. Emacs vs. Claude

https://blog.calif.io/p/mad-bugs-vim-vs-emacs-vs-claude
32•Munksgaard•1h ago

Comments

grimm8080•1h ago
What does RCE mean?
virtue3•1h ago
Remote code execution - aka they can run arbitrary code on the compromised machine via the bug.

Basically the worst possible thing.

snarf_br•1h ago
Remote Code Execution, which this isn't, in both cases.

It is code execution.

chrismorgan•1h ago
RCE stands for Remote Code Execution: being able to trigger arbitrary code execution (ACE) from a remote machine.

This, however, is mislabelled: it’s not remote code execution at all, only local. It would only become RCE if there was some path to remotely triggering Vim to open the attack file, or Emacs the attack repository, or if a normal way of fetching a repository automatically set up and executed the hook.

pjmlp•1h ago
> How do we professional bug hunters make sense of this? This feels like the early 2000s. Back then a kid could hack anything, with SQL Injection. Now with Claude.

Lack of accountability.

With other industries, when people aren't happy with their products, they ask for money back, they sue, they switch to the competition.

There are no EULA that assert removal of customer rights if the product is acquired.

zingar•1h ago
I don’t understand the connection to the post, could you elaborate?
pjmlp•43m ago
Those kinds of bugs exist because no-one is accountable for quality like in other industries, unless it is on high integrity computing, or the cyber security laws that are finally coming into place across several countries.
normie3000•1h ago
I'd be interested to understand what modelines are for, and if this is a class of bug that can be disabled via vim settings. Also, are there editors which could not be affected by this class of bug?
normie3000•58m ago
Struggling to find a source, but apparently modelines are disabled by default in debian and perhaps other common distros.
disfadbish•52m ago
modelines are special lines you can put into files that sets vim options when the file is read by vim. Probably most commonly used to set tab space and tab width.
Roguelazer•51m ago
modelines allow you to put a special comment in your file (typically on the first or last line of the file, and [for vim] of the format `# vim: set ts=2:`) to configure a subset of editor settings automatically whenever that file is opened in a buffer. They're very common, especially in codebases where there are lots of different styles in different files. Many editors (e.g., Zed (as of https://github.com/zed-industries/zed/pull/49267)) support vim and/or emacs's syntaxes for modelines.

Modelines were disabled by default for security reasons for a long time. It's kind of wild to me that they're enabled in some distributions, but there still isn't much restriction on what settings can be configured; I've never seen a modeline in the wild that did anything other than set `filetype`, `fileencoding`, `tabwidth`, `expandtab` (hard tabs vs spaces), and maybe `tabstop` / `softtabstop`.

lloeki•35m ago
> I've never seen a modeline in the wild that did anything other than

Hence the securemodelines plugin

https://www.vim.org/scripts/script.php?script_id=1876

> if this is a class of bug that can be disabled via vim settings.

    set nomodeline
That is, as parent mentioned, if it's not done already by your distro or OS.
eterm•27m ago
They no doubt predate .editorconfig, but the problem as described is now better solved by .editorconfig, which can be used to configure directory and file specific configuration and works cross-editor too.
000ooo000•57m ago
tldr

    /* vim: set showtabpanel=2 tabpanel=%{%autocmd_add([{'event'\:'SafeStateAgain','pattern'\:'*','cmd'\:'!id>/tmp/calif-vim-rce-poc','once'\:1}])%}: */
Andebugulin•56m ago
That's a bit funny to me, because the level of absurdity you get from reading something like that is insane, I have been using vim on a daily bases for more than 5 years now. One day thought about contributing to vim because was silly enough to believe that the tool shouldn't be that many lines of code, something doable, like in couple thousands, then found out its way way more than that and closer to half a mill, couldn't even dream of understanding anything, not close to be fluent enough to find RCEs.
teiferer•3m ago
> shouldn't be that many lines of code, something doable, like in couple thousands

If you believe that then you have hardly scratched the surface of what your editor is capable of doing.

zingar•56m ago
The claim is astonishing, given emacs’ continuous use and open source scrutiny for decades. Edit: and turns out to be a problem with git, not emacs.

OTOH it’s really just the core that has been used so widely and so continuously for so long. This integration with git will have been scrutinized far less.

As an emacs user I frequently find myself in territory where I’m seemingly the only person in the world with my use case. In fact that’s half of the value: I can make emacs do whatever I want. Which means there’s security consistent with a bus factor of 1.

snarf_br•55m ago
Overhyped, misnomer as this is not an RCE, and emacs maintainers who are correct as you can trigger the same thing by just running git ls-files to execute things if you configure the .git folder as the exploit does.
cryptbe•7m ago
Disclosure: I didn’t discover the bugs, but helped write the blog post.

These issues are technically classified as local code execution (AV:L), but they go against a pretty strong user expectation: that opening a file should be safe. In reality, they can be triggered through very common workflows like downloading and opening files, which makes them feel a lot closer to some remote scenarios, even if they’re not strictly RCE.

At the end of the day, regardless of how you classify them, it’s worth being aware of the risks when opening untrusted files in editors like Vim or Emacs.

i_cannot_hack•54m ago
The first one seems to indeed be a real RCE in vim.

Also including the emacs one as a "found vulnerability" seems really disingenuous. It basically amounts to "emacs will call git status, and git status will call git hooks that can execute arbitrary code".

1. As the Emacs maintainers point out, it is indeed an issue with git, not emacs, and they are completely right to not address the issue.

2. It is something that has been known for decades. That is the reason hooks are never copied when doing git clone, to prevent this scenario (notice that the author uses wget instead of git clone to get around this).

Funnily enough this posts highlights both the strengths and the hazards of using AI, (1) quickly and easily finding real issues that would have taken a human a laborious audit to find (2) quickly and unthinkingly generating plausible sounding but ultimately meaningless vulnerability reports on some clout chasing mission and overwhelming open source maintainers with AI slop.

cryptbe•38m ago
When I wget a tarball, unzip, and emacs a.txt inside, I don't expect that it'd execute arbitrary commands.

I think people should be aware of this risk, especially when it looks like it's not getting fixed.

Disclosure: I didn't find the bugs. I helped wrote the blog post.

chotmat•10m ago
I don't think this is fair, as it will likely also affect any editor with Git integration (or not?)
lloeki•23m ago
> The first one seems to indeed be a real RCE in vim.

Barely, since there is little restriction as to what options modelines can set they should be largely considered equivalent to eval (if unintentionally). And generally they are which is why distros typically disable them by default.

IMHO in this day and age securemodelines should just be the default.

https://www.vim.org/scripts/script.php?script_id=1876

chrismorgan•52m ago
I suspect that if you asked ten Vim developers where they’d start looking for this kind of security issue, at least nine of them would say “modeline” (and if one didn’t, it would just be because they forgot about the feature, and would change their answer to that as soon as you mentioned it). There’s a reason popular configurations have disabled it from time immemorial.

As for the Emacs thing, it feels utterly unfair to blame Emacs. The issue is 100% Git, and it’s unreasonable and undesirable for things like Emacs to try to put guard rails around parts of its functionality. Especially guard rails that may harm functionality. They were right to decline the suggested patch.

I don’t know how the sessions actually ran, but the Vim one probably started with “low-hanging fruit, let’s start by seeing if modeline has accidentally become insecure yet again”, and the emacs with “meh, don’t know anything offhand, before delving into code let’s see if… ooh look it runs Git, so can we apply the ol’ fsmonitor chestnut there?”

lloeki•42m ago
> We asked Claude to find a bug in Vim. It found an RCE. Just open a file, and you’re owned.

Yeah reading the above opening paragraph I was immediately going "oh Claude found out about modelines"

modelines are largely considered a (roundabout) equivalent to flat out eval, There's a reason plugins such as securemodelines exist:

https://www.vim.org/scripts/script.php?script_id=1876

ploxiln•41m ago
Yup, I've had "nomodeline" in my vimrc for years. I used to add the "securemodelines" plugin https://www.vim.org/scripts/script.php?script_id=1876 but just recently removed that too (I think I may have ran into an annoyance after a vim update, and decided I never really use automatic modeline support anyway)
152334H•13m ago
Doubtful commentary misses the obvious: that, had Calif been slightly more responsible in their harness design -- and in particular, their definition of what constitutes a real bug -- it'd be rather unsurprising if Claude correctly dug some up.

EPropelled Electric Propulsion Motors for Uncrewed Vehicles

1•ePropelled•44s ago•0 comments

Cloud Cost Optimizer – Magical one-click button

https://stopburning.money/
1•alianinfo•2m ago•1 comments

A Change to Common Crawl Dataset Size Reporting

https://commoncrawl.org/blog/announcing-a-change-to-common-crawl-dataset-size-reporting
1•ccgreg•3m ago•1 comments

I open-sourced Claude's best feature

https://github.com/Kilo-Loco/homie-mcp
1•kiloloco•4m ago•1 comments

Show HN: TraceLit – debug LeetCode step by step

https://tracelit.dev/
1•eric_z•8m ago•0 comments

Claude Code source leak reveals how much info Anthropic can hoover up about you

https://www.theregister.com/2026/04/01/claude_code_source_leak_privacy_nightmare/
3•jruohonen•14m ago•0 comments

CERN levels up with new superconducting karts

https://home.cern/news/news/engineering/cern-levels-new-superconducting-karts
8•fnands•17m ago•0 comments

AWS App Runner availability change

https://docs.aws.amazon.com/apprunner/latest/dg/apprunner-availability-change.html
2•seyz•18m ago•0 comments

Remembering Magnetic Memories and the Apollo AGC

https://2earth.github.io/website/20260304.html
2•2earth•22m ago•0 comments

Show HN: Kbot – open-source terminal AI with dream engine (676 tools, $0 local)

https://github.com/isaacsight/kernel
2•isaacsight•28m ago•0 comments

Paste clipboard images into Claude Code over SSH

https://alexanderzeitler.com/articles/paste-clipboard-images-into-claude-code-over-ssh/
2•alexzeitler•28m ago•0 comments

Portel: The Observability Platform for Portlet-Based Generative UI

https://ollygarden.com/press/portel-april-2026
1•ollygarden•31m ago•0 comments

Why AI agents fail customer operations

https://www.sentohq.com/posts/why-ai-agents-fail-customer-operations
3•adrved•31m ago•0 comments

Embracing AI with Claude's C Compiler

https://chipsandcheese.com/p/embracing-ai-with-claudes-c-compiler
4•kevvok•33m ago•0 comments

Italy Senate Wi-Fi Password Sparks Buzz After "Dux" Appears in Network Sign

https://www.repubblica.it/politica/2026/04/01/news/senato_spunta_dux_password_wifi-425256568/
2•omblivion•35m ago•0 comments

Project Lean – The $10B Singularity Architecture

1•tk-LEAN•35m ago•0 comments

Atemis II Launch

https://www.esa.int/Science_Exploration/Human_and_Robotic_Exploration/Watch_live_Artemis_II_launch
1•nhatcher•35m ago•0 comments

Mediatek predictive reboot engine driver

https://github.com/openwrt/openwrt/pull/22722
2•mradalbert•36m ago•0 comments

Show HN: HookBell – Turn any webhook into a push notification on your phone

1•akshitkrnagpal•40m ago•0 comments

Using DNA as a method to encrypt sensitive messages has become possible

https://www.cnrs.fr/en/press/dna-cryptography-new-french-japanese-approach-has-proven-its-worth
2•matthieu_bl•40m ago•0 comments

Quantum computers need fewer resources than thought to break vital encry

https://arstechnica.com/security/2026/03/new-quantum-computing-advances-heighten-threat-to-ellipt...
3•joozio•41m ago•0 comments

Art schools are being torn apart by AI

https://www.theverge.com/tech/903954/art-schools-generative-ai-education-creative-jobs
6•bundie•45m ago•2 comments

Grist (spreadsheets) v1.7.12 adds Automations

https://support.getgrist.com/automations/
1•raybb•46m ago•0 comments

Delve – Fake Compliance as a Service – Part II – Day 1 of 5

https://substack.com/home/post/p-192144506
2•nickvec•46m ago•1 comments

Ask HN: What is the best software IDE to program with a local LLM and GPU?

1•roschdal•47m ago•1 comments

Open Multi-Agent: Multi-agent orchestration framework for TypeScript

https://github.com/JackChen-me/open-multi-agent
1•JackChen_me•50m ago•0 comments

Cutia: An AI-native, open-source video editor and free alternative to CapCut

https://cutia.msgbyte.com/en
1•moonrailgun•52m ago•0 comments

Manual SRE – For Artisanal Infrastructure Care

https://manual-sre.pro/
2•ilan34•56m ago•0 comments

The End of the "I Am Not a Robot" Box

https://formidable.care/tools/healthcaptcha
1•vincentxplore•1h ago•0 comments

The Everest scandal: poisonings and fraud on the roof of the world

https://www.thetimes.com/uk/crime/article/the-everest-scandal-poisonings-and-fraud-on-the-roof-of...
2•petethomas•1h ago•1 comments