{
  "threat_severity" : "Moderate",
  "public_date" : "2021-05-02T00:00:00Z",
  "bugzilla" : {
    "description" : "rubygem-rdoc: Command injection vulnerability in RDoc",
    "id" : "1980132",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1980132"
  },
  "cvss3" : {
    "cvss3_base_score" : "7.0",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-77",
  "details" : [ "In RDoc 3.11 through 6.x before 6.3.1, as distributed with Ruby through 3.0.1, it is possible to execute arbitrary code via | and tags in a filename.", "An operating system command injection flaw was found in RDoc. Using the rdoc command to generate documentation for a malicious Ruby source code could lead to execution of arbitrary commands with the privileges of the user running rdoc." ],
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2021-08-05T00:00:00Z",
    "advisory" : "RHSA-2021:3020",
    "cpe" : "cpe:/a:redhat:enterprise_linux:8",
    "package" : "ruby:2.7-8040020210728141159.522a0ee4"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2022-02-16T00:00:00Z",
    "advisory" : "RHSA-2022:0543",
    "cpe" : "cpe:/a:redhat:enterprise_linux:8",
    "package" : "ruby:2.6-8050020211215144356.c5368500"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2022-02-24T00:00:00Z",
    "advisory" : "RHSA-2022:0672",
    "cpe" : "cpe:/a:redhat:enterprise_linux:8",
    "package" : "ruby:2.5-8050020220216195847.c5368500"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions",
    "release_date" : "2022-02-21T00:00:00Z",
    "advisory" : "RHSA-2022:0581",
    "cpe" : "cpe:/a:redhat:rhel_e4s:8.1",
    "package" : "ruby:2.6-8010020220201152941.c27ad7f8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8.2 Extended Update Support",
    "release_date" : "2022-02-21T00:00:00Z",
    "advisory" : "RHSA-2022:0582",
    "cpe" : "cpe:/a:redhat:rhel_eus:8.2",
    "package" : "ruby:2.6-8020020220201131207.4cda2c84"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8.4 Extended Update Support",
    "release_date" : "2022-02-16T00:00:00Z",
    "advisory" : "RHSA-2022:0544",
    "cpe" : "cpe:/a:redhat:rhel_eus:8.4",
    "package" : "ruby:2.6-8040020220131135901.522a0ee4"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7",
    "release_date" : "2021-09-20T00:00:00Z",
    "advisory" : "RHSA-2021:3559",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:3::el7",
    "package" : "rh-ruby27-ruby-0:2.7.4-130.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7",
    "release_date" : "2021-10-25T00:00:00Z",
    "advisory" : "RHSA-2021:3982",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:3::el7",
    "package" : "rh-ruby30-ruby-0:3.0.2-148.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7",
    "release_date" : "2022-02-28T00:00:00Z",
    "advisory" : "RHSA-2022:0708",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:3::el7",
    "package" : "rh-ruby26-ruby-0:2.6.9-120.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS",
    "release_date" : "2021-09-20T00:00:00Z",
    "advisory" : "RHSA-2021:3559",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:3::el7",
    "package" : "rh-ruby27-ruby-0:2.7.4-130.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS",
    "release_date" : "2021-10-25T00:00:00Z",
    "advisory" : "RHSA-2021:3982",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:3::el7",
    "package" : "rh-ruby30-ruby-0:3.0.2-148.el7"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat 3scale API Management Platform 2",
    "fix_state" : "Fix deferred",
    "package_name" : "system",
    "cpe" : "cpe:/a:redhat:red_hat_3scale_amp:2",
    "impact" : "low"
  }, {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "ruby",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "ruby",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "ruby",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2021-31799\nhttps://nvd.nist.gov/vuln/detail/CVE-2021-31799\nhttps://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc/" ],
  "name" : "CVE-2021-31799",
  "csaw" : false
}