Skip to content
Heist/ feed
Back to feed
Low

ruby-octokit — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2022-31072

Octokit is a Ruby toolkit for the GitHub API. Versions 4.23.0 and 4.24.0 of the octokit gem were published containing world-writeable files. Specifically, the gem was packed with files having their permissions set to `-rw-rw-rw-` (i.e. 0666) instead of `rw-r--r--` (i.e. 0644). This means everyone who is not the owner (Group and Public) with access to the instance where this release had been installed could modify the world-writable files from this gem. This issue is patched in Octokit 4.25.0. Two workarounds are available. Users can use the previous version of the gem, v4.22.0. Alternatively, users can modify the file permissions manually until they are able to upgrade to the latest version.

Products
ruby-octokit
Affected versions
10.0.0-1, 3.8.0-1, 4.13.0+gh-1, 4.13.0-1, 4.15.0-1, 4.16.0-1, 4.17.0-2, 4.17.0-3, 4.20.0-1, 4.25.1-2, 4.7.0-3, 8.1.0-2, 8.1.0-4
Fixed versions
Not specified
CVEs
CVE-2022-31072
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 01:01 UTC · Revision 1

Source evidence

UBUNTU-CVE-2022-31072

core-osv · Original source

Published 15 Jun 2022, 23:15 UTC

Octokit is a Ruby toolkit for the GitHub API. Versions 4.23.0 and 4.24.0 of the octokit gem were published containing world-writeable files. Specifically, the gem was packed with files having their permissions set to `-rw-rw-rw-` (i.e. 0666) instead of `rw-r--r--` (i.e. 0644). This means everyone who is not the owner (Group and Public) with access to the instance where this release had been installed could modify the world-writable files from this gem. This issue is patched in Octokit 4.25.0. Two workarounds are available. Users can use the previous version of the gem, v4.22.0. Alternatively, users can modify the file permissions manually until they are able to upgrade to the latest version.

osv:UBUNTU-CVE-2022-31072

ruby-octokit

Fixed versions: Not specified

ruby-octokit

Fixed versions: Not specified

ruby-octokit

Fixed versions: Not specified

ruby-octokit

Fixed versions: Not specified

ruby-octokit

Fixed versions: Not specified

ruby-octokit

Fixed versions: Not specified

ruby-octokit

Fixed versions: Not specified

ruby-octokit

Fixed versions: Not specified

Complete source record
{
  "id": "365e0babfb7d53ee9114f6aeeca5ec31a8bf789a22b055617cbf588f3fcade59",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2022-31072",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2022-31072",
    "summary": "Octokit is a Ruby toolkit for the GitHub API. Versions 4.23.0 and 4.24.0 of the octokit gem were published containing world-writeable files. Specifically, the gem was packed with files having their permissions set to `-rw-rw-rw-` (i.e. 0666) instead of `rw-r--r--` (i.e. 0644). This means everyone who is not the owner (Group and Public) with access to the instance where this release had been installed could modify the world-writable files from this gem. This issue is patched in Octokit 4.25.0. Two workarounds are available. Users can use the previous version of the gem, v4.22.0. Alternatively, users can modify the file permissions manually until they are able to upgrade to the latest version.",
    "evidence": "osv:UBUNTU-CVE-2022-31072",
    "products": [
      {
        "name": {
          "value": "ruby-octokit",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.8.0-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-octokit",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.7.0-3",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-octokit",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.13.0-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.13.0+gh-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.15.0-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.16.0-1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-octokit",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.17.0-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "4.17.0-3",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-octokit",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.20.0-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "4.25.1-2",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-octokit",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "8.1.0-2",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "8.1.0-4",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-octokit",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "10.0.0-1",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-octokit",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "8.1.0-4",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "10.0.0-1",
            "evidence": "/affected/7/versions"
          }
        ]
      }
    ],
    "severity": "low",
    "structured": {
      "id": "UBUNTU-CVE-2022-31072",
      "aliases": [
        "UBUNTU-CVE-2022-31072"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-octokit",
            "purl": "pkg:deb/ubuntu/ruby-octokit?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "3.8.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31072.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-octokit",
                "binary_version": "3.8.0-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-octokit",
            "purl": "pkg:deb/ubuntu/ruby-octokit?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "4.7.0-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31072.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-octokit",
                "binary_version": "4.7.0-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-octokit",
            "purl": "pkg:deb/ubuntu/ruby-octokit?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "4.13.0-1",
            "4.13.0+gh-1",
            "4.15.0-1",
            "4.16.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31072.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-octokit",
                "binary_version": "4.16.0-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-octokit",
            "purl": "pkg:deb/ubuntu/ruby-octokit?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "4.17.0-2",
            "4.17.0-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31072.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-octokit",
                "binary_version": "4.17.0-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-octokit",
            "purl": "pkg:deb/ubuntu/ruby-octokit?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "4.20.0-1",
            "4.25.1-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31072.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-octokit",
                "binary_version": "4.25.1-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-octokit",
            "purl": "pkg:deb/ubuntu/ruby-octokit?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "8.1.0-2",
            "8.1.0-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31072.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-octokit",
                "binary_version": "8.1.0-4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-octokit",
            "purl": "pkg:deb/ubuntu/ruby-octokit?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "10.0.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31072.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-octokit",
                "binary_version": "10.0.0-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-octokit",
            "purl": "pkg:deb/ubuntu/ruby-octokit?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "8.1.0-4",
            "10.0.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-31072.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-octokit",
                "binary_version": "10.0.0-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:22.032089769Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-31072"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2022-31072",
        "https://github.com/octokit/octokit.rb/commit/1c8edecc9cf23d1ceb959d91a416a69f55ce7d55",
        "https://github.com/octokit/octokit.rb/security/advisories/GHSA-g28x-pgr3-qqx6",
        "https://www.cve.org/CVERecord?id=CVE-2022-31072"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-31072",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 355449,
  "published_at": "2022-06-15T23:15:00+00:00"
}