Command Injection Vulnerability in tomato

tomato Updated 02 Oct 2025

Summary

02/09/2020
HIGH
No i
High
Not published

GHSA-wqhw-frpx-5mmp: Command Injection in tomato. Affected versions are not published. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

tomato is an npm package that provides functionality for managing and executing commands in a system. It allows users to run commands through its API endpoint. However, all versions of tomato are vulnerable to Command Injection, as the API endpoint does not properly validate user input. This vulnerability enables attackers to execute arbitrary commands on the system, potentially leading to unauthorized access, data breaches, or system compromise.

Vulnerability Detail

The Command Injection vulnerability in tomato arises from the lack of input validation in the /api/exec endpoint. Attackers can exploit this by injecting malicious commands into user input, which are then executed by the system. This can result in various consequences, such as executing arbitrary code, modifying or deleting files, or gaining unauthorized access to sensitive information. The vulnerability has a severity rating of HIGH according to the Common Weakness Enumeration (CWE) classification (CWE-77).

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As there is no fix available, a possible workaround is to implement input validation and sanitization on the server-side before passing user input to the /api/exec endpoint. This can help mitigate the risk of command injection attacks. Here is an example of server-side code that demonstrates input validation:

const express = require('express');
const app = express();

app.post('/api/exec', (req, res) => {
  const userInput = req.body.command;
  // Perform input validation and sanitization
  const sanitizedInput = userInput.replace(/[;&|]/g, '');
  // Execute the sanitized command
  // ...
});

Conclusion

The Command Injection vulnerability in tomato exposes systems to the risk of unauthorized command execution. It is crucial to stay updated with the latest information from the official repository or advisory database for any fixes or patches. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tomato →

Share this vulnerability

FAQ

tomato is an npm package that provides functionality for managing and executing commands in a system. It offers an API endpoint for running commands.

Command Injection is a vulnerability that allows attackers to execute arbitrary commands on a system by injecting malicious commands into user input. In the case of tomato, the lack of input validation in the /api/exec endpoint enables this vulnerability.

The Command Injection vulnerability in tomato can lead to unauthorized access, data breaches, or system compromise. Attackers can execute arbitrary code, modify or delete files, or gain access to sensitive information.

Currently, there is no fix available for this vulnerability. It is recommended to consider using an alternative module that provides similar functionality but has proper input validation.

To mitigate the risk of this vulnerability, implement input validation and sanitization on the server-side before passing user input to the /api/exec endpoint. This can help prevent command injection attacks.

Related vulnerabilities

Recent vulnerabilities recorded for tomato.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback