Vulnerabilities in pkg:pypi/slo-generator

PACKAGE
Advisory Identifier: GHSA-j28r-j54m-gpc4
Advisory Summary

CVE-2021-22557 is a MODERATE (CVSS 5.3) code injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Slo generator libraries in the PyPI ecosystem. The issue involves code injection in slo generator. Remediation is available by upgrading affected packages to version 2.0.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/slo-generator

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/slo-generator. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-j28r-j54m-gpc4 CVE-2021-22557 MODERATE Code Injection in SLO Generator

CVE-2021-22557 at a Glance

CVE Identifier CVE-2021-22557
GHSA Identifier GHSA-j28r-j54m-gpc4
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Slo generator
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2021-22557

To remediate this vulnerability, upgrade all affected Slo generator dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

slo-generator fixed: 2.0.1
pip install slo-generator>=2.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show slo-generator

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2021-22557, inspect your installed packages using pip:

pip show slo-generator

Analyze the terminal output to locate any version of Slo generator in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.1), your application is affected.

Note: The pip show slo-generator command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Slo generator, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

SLO generator allows for loading of YAML files that if crafted in a specific format can allow for code execution within the context of the SLO Generator. We recommend upgrading SLO Generator past https://github.com/google/slo-generator/pull/173

CVE-2021-22557 Affected Slo generator Versions

1 component(s)
Fixed Versions:
2.0.1
Product / Package Ecosystem Affected Versions Fixed Version
slo-generator
PyPI
< 2.0.1
2.0.1

References

Frequently Asked Questions

What is CVE-2021-22557?
CVE-2021-22557 is a security vulnerability in Slo generator involving Code Injection in SLO Generator under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Slo generator versions are affected?
Affected versions include releases prior to 2.0.1 across affected packages: slo-generator.
What version fixes CVE-2021-22557?
Upgrading to 2.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is slo-generator affected?
Yes, slo-generator is affected in releases prior to 2.0.1. Upgrade your dependency to 2.0.1 or later.
What is the CVSS score of CVE-2021-22557?
CVE-2021-22557 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2021-22557?
CVE-2021-22557 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2021-22557?
Run the dependency tree command: 'pip show slo-generator'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j28r-j54m-gpc4",
  "modified" : "2024-10-22T16:34:47Z",
  "published" : "2021-10-05T17:53:59Z",
  "aliases" : [ "CVE-2021-22557" ],
  "summary" : "Code Injection in SLO Generator",
  "details" : "SLO generator allows for loading of YAML files that if crafted in a specific format can allow for code execution within the context of the SLO Generator. We recommend upgrading SLO Generator past https://github.com/google/slo-generator/pull/173 ",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "slo-generator"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-22557"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/slo-generator/pull/173"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/slo-generator/commit/36318beab1b85d14bb860e45bea186b184690d5d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/slo-generator/releases/tag/v2.0.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/slo-generator/PYSEC-2021-429.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "://github.com/google/slo-generator"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/164426/Google-SLO-Generator-2.0.0-Code-Execution.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78", "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-10-05T16:01:42Z",
    "nvd_published_at" : "2021-10-04T10:15:00Z"
  }
}