Skip to content

Prevent Lua injection in Neovim error notifications#3277

Merged
AndreasArvidsson merged 1 commit into
mainfrom
codex/fix-neovim-rpc-errors-for-lua-injection
May 22, 2026
Merged

Prevent Lua injection in Neovim error notifications#3277
AndreasArvidsson merged 1 commit into
mainfrom
codex/fix-neovim-rpc-errors-for-lua-injection

Conversation

@phillco
Copy link
Copy Markdown
Member

@phillco phillco commented May 20, 2026

Motivation

  • Prevent execution of attacker-controlled Lua by removing string interpolation of error messages into generated Lua code for Neovim notifications.

Description

  • Replace unsafe interpolation in showErrorMessage with an argument-bound call by using vim.notify(...) as the Lua snippet and passing the message via executeLua arguments so user text is treated as data.

Testing

  • Ran the repository lint suite with pnpm run lint, which completed successfully.

Codex Task

@AndreasArvidsson AndreasArvidsson merged commit 629033c into main May 22, 2026
17 of 23 checks passed
@AndreasArvidsson AndreasArvidsson deleted the codex/fix-neovim-rpc-errors-for-lua-injection branch May 22, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants