Skip to main content
Menu
Advisories

OS command injection in the code review tool in Language Servers for AWS

GHSA-X53H-XQF8-8M93Published Updated GitHub

Description

Language Servers for AWS is the open-source language server that powers Amazon Q Developer agentic chat in the Amazon Q Developer IDE plugins and is published on npm as @aws/lsp-codewhisperer. An issue exists where, under certain circumstances, the code review tool in Language Servers for AWS passed file paths supplied by the agent to a shell command without neutralizing special characters. Among Amazon Q Developer IDE plugins, this issue affects only Visual Studio Code and JetBrains. Eclipse and Visual Studio are not affected because they do not register the affected code review tool.

Impact

An actor who can place crafted content in a workspace that a user opens might cause the agent to run arbitrary commands with the privileges of the local user. The code review tool runs without an approval prompt, and the user does not need to request a code review. Among Amazon Q Developer IDE plugins, this issue affects only Visual Studio Code and JetBrains. Eclipse and Visual Studio are not affected because they do not register the affected code review tool.

Impacted versions: < 1.81.0; @aws/lsp-codewhisperer >= 0.0.65 AND < 0.0.130

Patches

This issue has been addressed in Language Servers for AWS version 1.81.0 [github.com/Amazon-Q-Developer/language-servers/releases/tag/v1.81.0] and the npm package @aws/lsp-codewhisperer 0.0.130 [npmjs.com/package/@aws/lsp-codewhisperer/v/0.0.130]. The fix runs Git without a shell, passes file paths as literal arguments, and validates artifact paths before using them.

We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes. Amazon Q Developer plugin users should restart their IDE to receive the latest version and keep their plugin up to date.

Workarounds

There is no workaround available.

References

If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.

Acknowledgement

We would like to thank zx (Jace) — GitHub: @manus-use for collaborating on this issue through the coordinated vulnerability disclosure process.

Affected versions

References

GitHub · Amazon-Q-Developer/language-servers