CVEfocus › CVE database › CVE-2022-31072

CVE-2022-31072Octokit gem published with world-writable files

CVSS 2.5 LowEPSS 0.3% (higher than 11% of CVEs)Published 2022-06-15Updated 2025-04-23Assigner: GitHub_M

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.

CWE-276

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

1Fixed
2Fix pending
3Under investigation
3Will not fix

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10ruby-octokitFix pendingUBUNTU-CVE-2022-31072
Ubuntu 26.04ruby-octokitUnder investigationUBUNTU-CVE-2022-31072
Ubuntu 25.10ruby-octokitWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-31072
Ubuntu 24.04ruby-octokitUnder investigationUBUNTU-CVE-2022-31072
Ubuntu 22.04ruby-octokitUnder investigationUBUNTU-CVE-2022-31072
Ubuntu 20.04ruby-octokitWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-31072
Ubuntu 18.04ruby-octokitWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-31072
Ubuntu 16.04ruby-octokitFix pendingUBUNTU-CVE-2022-31072
RubyGems libraryoctokitFixed4.25.0GHSA-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.

References

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.