Commit e323919
authored
Fix command injection in claude-supermemory openBrowser() (#19)
## Summary
This PR fixes a command injection vulnerability in `openBrowser()` by replacing
`exec()` with `execFile()` and passing arguments as an array.
## Details
The previous implementation used string concatenation when invoking external
commands, allowing shell metacharacters in a crafted URL to execute arbitrary
commands.
Using `execFile()` avoids shell interpolation and eliminates this attack vector.
## Related Issue
Closes #8681 parent 7ed7cc2 commit e323919
1 file changed
+11
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
0 commit comments