CVE-2022-31072
Octokit gem published with world-writable files
Also known as GHSA-g28x-pgr3-qqx6
Mitigation
- Upgrade octokit to 4.25.0 or later.
Who should check
- Projects that depend on RubyGems package octokit (>= 4.23.0, < 4.25.0)
- Anyone running octokit.rb >= 4.23.0, < 4.25.0
Vulnerability facts
- Affected
- octokit >= 4.23.0, < 4.25.0
- Fixed in
- 4.25.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 2.5 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: Low
- Availability impact: None
- EPSS
- 0.27% chance of exploitation in 30 days (percentile 11, 2026-11-26)
- CWE
- CWE-276
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| RubyGems octokit | >= 4.23.0, < 4.25.0 | 4.25.0 | osv |
| octokit.rb | >= 4.23.0, < 4.25.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-31072. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-31072.md Affected: octokit >= 4.23.0, < 4.25.0 Fixed in: 4.25.0 Steps: 1. Search this machine and project for octokit (RubyGems), octokit.rb: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2022-31072 being exploited?
There is no confirmed exploitation: CVE-2022-31072 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-31072?
Low: CVSS 2.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2022-31072?
octokit >= 4.23.0, < 4.25.0.
Is there a fix for CVE-2022-31072?
Yes. Fixed in 4.25.0. Upgrade octokit to 4.25.0 or later.
How do I check if I'm affected by CVE-2022-31072?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.