CVE-2021-22557: Code Injection in SLO Generator

slo-generator Updated 02 Oct 2025

Summary

05/10/2021
Yes i
Moderate
5.3

CVE-2021-22557: Code Injection in SLO Generator. Affects slo-generator versions < 2.0.1. Fixed in 2.0.1. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The SLO Generator is a Python package available on PyPI that allows for the generation of Service Level Objective (SLO) YAML files. It provides functionality to define and manage SLOs for monitoring and alerting purposes. The SLO Generator is widely used in various software projects to set and track service level objectives. However, a vulnerability has been discovered in the SLO Generator that allows for code injection if crafted YAML files are loaded in a specific format.

Vulnerability Detail

The vulnerability in the SLO Generator arises from the improper handling of YAML files. An attacker can exploit this vulnerability by crafting a malicious YAML file that contains code injection payloads. When this malicious YAML file is loaded by the SLO Generator, the injected code can be executed within the context of the SLO Generator. This can lead to unauthorized access, data leakage, or further compromise of the system. The vulnerability has a CVSS score of 5.3, indicating a moderate severity level.

How To Fix

Minimum fixed version

2.0.1

This is the first release that contains the fix.

pip install --upgrade "slo-generator==2.0.1"

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

Workaround

There is no specific workaround mentioned for this vulnerability. The recommended solution is to upgrade to a fixed version of the SLO Generator.

Conclusion

The SLO Generator is vulnerable to a code injection vulnerability that can be exploited by loading specially crafted YAML files. To mitigate this vulnerability, it is crucial to upgrade the SLO Generator to a version past 2.0.1. This upgrade includes the necessary security patches to prevent code injection attacks. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for slo-generator →

Share this vulnerability

FAQ

The SLO Generator is a Python package used for generating Service Level Objective (SLO) YAML files. It allows users to define and manage SLOs for monitoring and alerting purposes.

The code injection vulnerability in the SLO Generator occurs due to improper handling of crafted YAML files. When a malicious YAML file with code injection payloads is loaded, the injected code can be executed within the SLO Generator's context.

The code injection vulnerability in the SLO Generator can lead to unauthorized access, data leakage, or further compromise of the system. An attacker could execute arbitrary code within the SLO Generator's context, potentially gaining control over the system.

To fix this vulnerability, it is recommended to upgrade the SLO Generator to a version past 2.0.1. The fix for this vulnerability is available in the following pull request: https://github.com/google/slo-generator/pull/173.

There is no specific workaround mentioned for this vulnerability. The recommended solution is to upgrade to a fixed version of the SLO Generator.

How To Fix

Minimum fixed version

2.0.1

This is the first release that contains the fix.

pip install --upgrade "slo-generator==2.0.1"

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