CVE-2024-34347: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in hoppscotch hoppscotch
@hoppscotch/cli is a CLI to run Hoppscotch Test Scripts in CI environments. Prior to 0.8.0, 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 scripts interactions with environment variables and more. But this also allows the pre-request script to escape the sandbox. This vulnerability is fixed in 0.8.0.
AI Analysis
Technical Summary
CVE-2024-34347 is a high-severity command injection vulnerability affecting the hoppscotch project, specifically versions >= 0.5.0 and < 0.8.0. Hoppscotch is a tool used for API testing, and its CLI (@hoppscotch/cli) enables running test scripts in continuous integration (CI) environments. The vulnerability arises from the @hoppscotch/js-sandbox package, which implements a JavaScript sandbox using Node.js's vm module. The vm module is known to be unsafe for sandboxing untrusted code because if the sandboxed code gains access to references of objects created outside the vm context, it can escape the sandbox and execute arbitrary commands. In hoppscotch, multiple references to external objects are deliberately passed into the vm context to allow pre-request scripts to interact with environment variables and other data. However, this design flaw allows malicious pre-request scripts to break out of the sandbox and perform command injection attacks. This can lead to full compromise of the host environment where the CLI is running. The vulnerability affects confidentiality, integrity, and availability, as attackers can execute arbitrary commands, potentially stealing sensitive data, modifying or deleting resources, or disrupting service. The issue was fixed in version 0.8.0 by presumably removing or restricting unsafe references passed into the vm context. The CVSS 3.1 score is 8.4 (high), reflecting network attack vector, high impact on confidentiality, integrity, and availability, no privileges required, but user interaction is needed (running a malicious pre-request script). No known exploits are reported in the wild yet. This vulnerability is a classic example of CWE-77 (Improper Neutralization of Special Elements used in a Command), i.e., command injection due to unsafe handling of input and sandbox escape. Organizations using hoppscotch CLI in CI pipelines with vulnerable versions are at risk if untrusted or malicious test scripts are executed.
Potential Impact
For European organizations, the impact of CVE-2024-34347 can be significant, especially for those relying on hoppscotch CLI for automated API testing in their CI/CD pipelines. Successful exploitation could allow attackers to execute arbitrary commands on build or test servers, leading to potential data breaches, unauthorized access to internal systems, and disruption of development workflows. This could result in leakage of sensitive business or customer data, tampering with code or test results, and downtime of critical development infrastructure. Organizations in sectors with strict data protection regulations such as GDPR (e.g., finance, healthcare, government) face heightened risks of regulatory penalties and reputational damage if this vulnerability is exploited. Additionally, CI environments often have elevated privileges or access to production-like environments, increasing the severity of a compromise. Since the vulnerability requires user interaction (running malicious scripts), the risk is higher in environments where third-party or community-contributed test scripts are used without strict validation. The lack of known exploits in the wild currently reduces immediate risk but does not eliminate it, as attackers may develop exploits rapidly once the vulnerability is public.
Mitigation Recommendations
1. Upgrade hoppscotch CLI to version 0.8.0 or later immediately to apply the fix that removes the unsafe sandbox escape vectors. 2. Implement strict validation and code review processes for all pre-request scripts used in CI pipelines to ensure no untrusted or malicious code is executed. 3. Restrict execution of hoppscotch CLI and related testing tools to isolated environments with minimal privileges and network access to limit potential damage from exploitation. 4. Use containerization or sandboxing technologies external to Node.js vm to isolate test execution environments more securely. 5. Monitor CI/CD pipeline logs and system activity for unusual command execution or anomalies that could indicate exploitation attempts. 6. Educate developers and DevOps teams about the risks of running untrusted scripts and enforce policies to prevent unauthorized script injection. 7. If upgrading immediately is not possible, consider disabling or restricting the use of pre-request scripts in hoppscotch CLI until patched. 8. Maintain an inventory of affected versions in use and track updates from hoppscotch for any further advisories.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Belgium, Italy, Spain
CVE-2024-34347: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in hoppscotch hoppscotch
Description
@hoppscotch/cli is a CLI to run Hoppscotch Test Scripts in CI environments. Prior to 0.8.0, 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 scripts interactions with environment variables and more. But this also allows the pre-request script to escape the sandbox. This vulnerability is fixed in 0.8.0.
AI-Powered Analysis
Technical Analysis
CVE-2024-34347 is a high-severity command injection vulnerability affecting the hoppscotch project, specifically versions >= 0.5.0 and < 0.8.0. Hoppscotch is a tool used for API testing, and its CLI (@hoppscotch/cli) enables running test scripts in continuous integration (CI) environments. The vulnerability arises from the @hoppscotch/js-sandbox package, which implements a JavaScript sandbox using Node.js's vm module. The vm module is known to be unsafe for sandboxing untrusted code because if the sandboxed code gains access to references of objects created outside the vm context, it can escape the sandbox and execute arbitrary commands. In hoppscotch, multiple references to external objects are deliberately passed into the vm context to allow pre-request scripts to interact with environment variables and other data. However, this design flaw allows malicious pre-request scripts to break out of the sandbox and perform command injection attacks. This can lead to full compromise of the host environment where the CLI is running. The vulnerability affects confidentiality, integrity, and availability, as attackers can execute arbitrary commands, potentially stealing sensitive data, modifying or deleting resources, or disrupting service. The issue was fixed in version 0.8.0 by presumably removing or restricting unsafe references passed into the vm context. The CVSS 3.1 score is 8.4 (high), reflecting network attack vector, high impact on confidentiality, integrity, and availability, no privileges required, but user interaction is needed (running a malicious pre-request script). No known exploits are reported in the wild yet. This vulnerability is a classic example of CWE-77 (Improper Neutralization of Special Elements used in a Command), i.e., command injection due to unsafe handling of input and sandbox escape. Organizations using hoppscotch CLI in CI pipelines with vulnerable versions are at risk if untrusted or malicious test scripts are executed.
Potential Impact
For European organizations, the impact of CVE-2024-34347 can be significant, especially for those relying on hoppscotch CLI for automated API testing in their CI/CD pipelines. Successful exploitation could allow attackers to execute arbitrary commands on build or test servers, leading to potential data breaches, unauthorized access to internal systems, and disruption of development workflows. This could result in leakage of sensitive business or customer data, tampering with code or test results, and downtime of critical development infrastructure. Organizations in sectors with strict data protection regulations such as GDPR (e.g., finance, healthcare, government) face heightened risks of regulatory penalties and reputational damage if this vulnerability is exploited. Additionally, CI environments often have elevated privileges or access to production-like environments, increasing the severity of a compromise. Since the vulnerability requires user interaction (running malicious scripts), the risk is higher in environments where third-party or community-contributed test scripts are used without strict validation. The lack of known exploits in the wild currently reduces immediate risk but does not eliminate it, as attackers may develop exploits rapidly once the vulnerability is public.
Mitigation Recommendations
1. Upgrade hoppscotch CLI to version 0.8.0 or later immediately to apply the fix that removes the unsafe sandbox escape vectors. 2. Implement strict validation and code review processes for all pre-request scripts used in CI pipelines to ensure no untrusted or malicious code is executed. 3. Restrict execution of hoppscotch CLI and related testing tools to isolated environments with minimal privileges and network access to limit potential damage from exploitation. 4. Use containerization or sandboxing technologies external to Node.js vm to isolate test execution environments more securely. 5. Monitor CI/CD pipeline logs and system activity for unusual command execution or anomalies that could indicate exploitation attempts. 6. Educate developers and DevOps teams about the risks of running untrusted scripts and enforce policies to prevent unauthorized script injection. 7. If upgrading immediately is not possible, consider disabling or restricting the use of pre-request scripts in hoppscotch CLI until patched. 8. Maintain an inventory of affected versions in use and track updates from hoppscotch for any further advisories.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2024-05-02T06:36:32.437Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68487f531b0bd07c39389f99
Added to database: 6/10/2025, 6:54:11 PM
Last enriched: 7/11/2025, 5:32:50 AM
Last updated: 8/12/2025, 12:43:14 AM
Views: 18
Related Threats
Researcher to release exploit for full auth bypass on FortiWeb
HighCVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.