nanocoder
nanocoder copied to clipboard
[Bug] notifications.ts Windows PowerShell string injection
Description
The script uses single-quote interpolation for title and message and only escapes single quotes (' -> ''). Backticks ( ` ) inside the user-controlled title/message may allow arbitrary code execution by PowerShell depending on the evaluation context (or simply break the notification if PowerShell attempts to resolve variables).
Environment
- OS: Windows
- Node version: v22.20.0
- Nanocoder version: 1.30.0
- Provider: N/A
- Model: N/A
Steps to Reproduce
- On Windows, trigger a notification where the title is
`whoami`or similar. - Observe the notification.
Expected Behavior
The notification text should safely render the exact literal characters.
Actual Behavior
Code might be executed or formatting might break.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] I can reproduce this issue consistently
- [x] This issue occurs with the latest version of nanocoder
Hi @akramcodez would love to work on this issue!