CVE-2020-7607: OS Command Injection in gulp-styledocco

gulp-styledocco Updated 02 Oct 2025

Summary

07/05/2021
No i
Critical
9.8

CVE-2020-7607: OS Command Injection in gulkp-styledocco. Affects gulp-styledocco versions < 0.0.3. 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

gulp-styledocco is an npm package used for generating style guides from CSS comments. It provides a Gulp plugin that allows developers to automate the generation of styledocco documentation. This package is vulnerable to OS command injection, which can lead to the execution of arbitrary commands. The 'options' argument in the 'index.js' file is not properly sanitized, allowing users to control it and potentially execute malicious commands.

Vulnerability Detail

The OS command injection vulnerability in gulp-styledocco allows an attacker to inject arbitrary commands into the 'options' argument. This can lead to various security risks, including remote code execution, data exfiltration, and unauthorized access to the underlying system. The lack of input sanitization allows an attacker to manipulate the 'options' argument and execute arbitrary commands with the privileges of the user running the gulp-styledocco process.

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 a temporary workaround, developers can manually sanitize and validate the user-controlled input before passing it to the 'options' argument. This can be done by implementing input validation and filtering techniques to prevent the execution of arbitrary commands. Here's an example of how to sanitize the 'options' argument using the 'shell-quote' npm package:

const shellQuote = require('shell-quote');

function sanitizeOptions(options) {
  return shellQuote.quote([options]);
}

const sanitizedOptions = sanitizeOptions(userInput);

Conclusion

The OS command injection vulnerability in gulp-styledocco can have severe security implications, allowing attackers to execute arbitrary commands on the underlying system. It is crucial to update to a patched version of gulp-styledocco and implement proper input validation to mitigate this vulnerability. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for gulp-styledocco →

Share this vulnerability

FAQ

gulp-styledocco is an npm package used for generating style guides from CSS comments. It provides a Gulp plugin that automates the generation of styledocco documentation.

OS command injection is a vulnerability that allows an attacker to execute arbitrary commands on a target system. In this case, the vulnerability in gulp-styledocco allows an attacker to inject and execute arbitrary commands through the 'options' argument.

The OS command injection vulnerability in gulp-styledocco can lead to remote code execution, data exfiltration, and unauthorized access to the underlying system. An attacker could execute malicious commands with the privileges of the user running the gulp-styledocco process.

To fix this vulnerability, update gulp-styledocco to a version higher than 0.0.3, where the vulnerability has been patched. Additionally, ensure that user-controlled input is properly sanitized and validated before being used in command execution or system calls.

As a temporary workaround, you can manually sanitize and validate user-controlled input before passing it to the 'options' argument. Implement input validation and filtering techniques to prevent the execution of arbitrary commands.

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