Vulnerability · Published Jun 15, 2022 · Assigned by GitHub_M
CVE-2022-31072Octokit gem published with world-writable files
Low 2.5
In plain English
A low-severity incorrect default permissions in octokit.rb from octokit. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| RubyGems | octokit | 4.25.0 | GHSA-g28x-pgr3-qqx6 |
| Ubuntu:22.04:LTS | ruby-octokit | no fix listed | UBUNTU-CVE-2022-31072 |
| Ubuntu:24.04:LTS | ruby-octokit | no fix listed | UBUNTU-CVE-2022-31072 |
| Ubuntu:25.10 | ruby-octokit | no fix listed | UBUNTU-CVE-2022-31072 |
| Ubuntu:26.04:LTS | ruby-octokit | no fix listed | UBUNTU-CVE-2022-31072 |
| Ubuntu:26.10 | ruby-octokit | no fix listed | UBUNTU-CVE-2022-31072 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| octokit | octokit.rb | >= 4.23.0, < 4.25.0 |
Weakness: CWE-276 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N