CVE-2020-13388: OS Command Injection in jw.util

jw-util Updated 02 Oct 2025

Summary

02/06/2021
Yes i
Critical
9.8

CVE-2020-13388: OS Command Injection in jw.util. Affects jw-util versions < 2.3. Fixed in 2.3. 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

jw-util is a Python package available on PyPI that provides various utility functions for working with JSON and YAML configurations. It is commonly used in Python applications to load and manipulate configuration files. However, versions before 2.3 of jw-util are vulnerable to an OS command injection attack when loading configurations with YAML. This vulnerability allows an attacker to execute arbitrary Python code, leading to potential OS command execution.

Vulnerability Detail

The vulnerability in jw-util arises from the insecure loading of configurations using YAML. When loading a configuration with the FromString or FromStream methods, the package does not utilize safe_load, which is a secure method for parsing YAML. As a result, an attacker can craft a malicious YAML configuration that includes Python code, which will be executed when the configuration is loaded. This can lead to unauthorized OS command execution with the privileges of the application or user running the vulnerable code.

How To Fix

Minimum fixed version

2.3

This is the first release that contains the fix.

pip install --upgrade "jw-util==2.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a workaround, developers can manually sanitize and validate the YAML configurations before loading them with jw-util. This involves inspecting the configuration files for any suspicious or potentially malicious code and removing or neutralizing it. However, this approach is error-prone and not recommended as it may introduce human errors and overlook certain attack vectors. It is strongly advised to upgrade to the fixed version of jw-util instead.

Conclusion

In conclusion, the jw-util package before version 2.3 is vulnerable to OS command injection when loading YAML configurations. This can lead to unauthorized OS command execution. It is crucial for developers to upgrade to the fixed version and ensure their applications are not exposed to this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for jw-util →

Share this vulnerability

FAQ

jw-util is a Python package available on PyPI that provides utility functions for working with JSON and YAML configurations. It is commonly used in Python applications to load and manipulate configuration files.

This vulnerability allows an attacker to execute arbitrary Python code, potentially leading to unauthorized OS command execution. The impact depends on the privileges of the application or user running the vulnerable code.

To fix this vulnerability, it is recommended to upgrade to version 2.3 or later of jw-util. This version includes secure parsing of YAML configurations, preventing the execution of malicious code.

A workaround involves manually inspecting and sanitizing the YAML configurations before loading them with jw-util. However, this approach is error-prone and not recommended. Upgrading to the fixed version is the recommended solution.

How To Fix

Minimum fixed version

2.3

This is the first release that contains the fix.

pip install --upgrade "jw-util==2.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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