Skip to main content

Improper Neutralization of Special Elements used in a Command ('Command Injection')

CVE-2024-34347

Severity High
Score 8.3/10

Summary

The package @hoppscotch/cli is a CLI to run Hoppscotch Test Scripts in CI environments. The @hoppscotch/js-sandbox package provides a JavaScript sandbox that uses the Node.js VM module. However, the VM module is not safe for sandboxing untrusted JavaScript code. This is because code inside the VM context can break out if it can get a hold of any reference to an object created outside of the VM. In the case of @hoppscotch/js-sandbox, multiple references to external objects are passed into the VM context to allow pre-request script interactions with environment variables and more. But this also allows the pre-request script to escape the sandbox. This issue affects @hoppscotch/cli versions 0.5.0 through 0.7.0.

  • HIGH
  • NETWORK
  • HIGH
  • CHANGED
  • REQUIRED
  • NONE
  • HIGH
  • HIGH

CWE-77 - Command Injection

A command injection attack involves injecting an operating system command through the data input, which gets executed on the host operating system with the privileges of the victimized application. The impact of a command injection attack may range from loss of data confidentiality and integrity to unauthorized remote access to the hosting system. The attack may cause serious data breaches and system takeover.

Advisory Timeline

  • Published