Intent-Code Divergence
High
- Confidence
- 99% confidence
- Finding
- The comments describe a calculator, but the implementation builds shell commands by interpolating the user-controlled expression directly into execSync calls. On Linux/macOS, an attacker can inject shell metacharacters into the bc or python3 command string; on Windows, the PowerShell invocation also embeds unsanitized input, enabling arbitrary command execution rather than mere arithmetic evaluation.
