CVE-2022-31072Octokit gem published with world-writable files
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.
What to do
Fixed builds are available from RubyGems: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | ruby-octokit | Fix pending | UBUNTU-CVE-2022-31072 | |
| Ubuntu 26.04 | ruby-octokit | Under investigation | UBUNTU-CVE-2022-31072 | |
| Ubuntu 25.10 | ruby-octokit | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-31072 | |
| Ubuntu 24.04 | ruby-octokit | Under investigation | UBUNTU-CVE-2022-31072 | |
| Ubuntu 22.04 | ruby-octokit | Under investigation | UBUNTU-CVE-2022-31072 | |
| Ubuntu 20.04 | ruby-octokit | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-31072 | |
| Ubuntu 18.04 | ruby-octokit | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-31072 | |
| Ubuntu 16.04 | ruby-octokit | Fix pending | UBUNTU-CVE-2022-31072 | |
| RubyGems library | octokit | Fixed | 4.25.0 | GHSA-g28x-pgr3-qqx6 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- octokit.rb: affected: >= 4.23.0, < 4.25.0
References
- https://github.com/octokit/octokit.rb/security/advisories/GHSA-g28x-pgr3-qqx6
- https://github.com/octokit/octokit.rb/commit/1c8edecc9cf23d1ceb959d91a416a69f55ce7d55
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.