CVE-2021-31605: Openvpn monitor Furlongm Openvpn-monitor Command Injection Vulnerability

HIGH
Advisory Identifier: GHSA-4258-vcjw-wwxx
CVSS 7.5
CWE-77
Published
Advisory Summary

CVE-2021-31605 is a HIGH (CVSS 7.5) furlongm openvpn-monitor command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Openvpn monitor libraries in the PyPI ecosystem. The issue involves furlongm openvpn-monitor command injection. Remediation is available in the latest vendor maintenance releases.

CVE-2021-31605 at a Glance

CVE Identifier CVE-2021-31605
GHSA Identifier GHSA-4258-vcjw-wwxx
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Openvpn monitor
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2021-31605

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

openvpn-monitor fixed: Latest secure release
pip install openvpn-monitor>=Latest secure release
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 openvpn-monitor

How to Check if You Are Affected

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

pip show openvpn-monitor

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Openvpn monitor, 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

furlongm openvpn-monitor through 1.1.3 allows `%0a` command injection via the OpenVPN management interface socket. This can shut down the server via signal `SIGTERM`.

CVE-2021-31605 Affected Openvpn monitor Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
openvpn-monitor
PyPI
≤ 1.1.3

References

Frequently Asked Questions

What is CVE-2021-31605?
CVE-2021-31605 is a security vulnerability in Openvpn monitor involving furlongm openvpn-monitor command injection under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Openvpn monitor versions are affected?
Affected versions include releases prior to current release patches across affected packages: openvpn-monitor.
What version fixes CVE-2021-31605?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is openvpn-monitor affected?
Yes, openvpn-monitor is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-31605?
CVE-2021-31605 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-31605?
CVE-2021-31605 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2021-31605?
Run the dependency tree command: 'pip show openvpn-monitor'. 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-4258-vcjw-wwxx",
  "modified" : "2024-10-08T12:40:23Z",
  "published" : "2022-05-24T19:15:55Z",
  "aliases" : [ "CVE-2021-31605" ],
  "summary" : "furlongm openvpn-monitor command injection",
  "details" : "furlongm openvpn-monitor through 1.1.3 allows `%0a` command injection via the OpenVPN management interface socket. This can shut down the server via signal `SIGTERM`.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "openvpn-monitor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-31605"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/furlongm/openvpn-monitor"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/furlongm/openvpn-monitor/releases"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/openvpn-monitor/PYSEC-2021-353.yaml"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/164278/OpenVPN-Monitor-1.1.3-Command-Injection.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-23T20:51:55Z",
    "nvd_published_at" : "2021-09-27T06:15:00Z"
  }
}