{"schemaVersion":3,"id":"CVE-2022-31072","aliases":["UBUNTU-CVE-2022-31072","GHSA-g28x-pgr3-qqx6"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2022-06-15T22:35:10.000Z","modified":"2025-04-23T18:11:25.606Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":3.3,"severity":"low","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":2.5,"severity":"low","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":3.3,"severity":"low","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","exploitability":4.6,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Rubygems","score":2.5,"severity":"low","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","exploitability":2.6,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":3.3,"severity":"low","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":2.1,"severity":"low","vector":"AV:L/AC:L/Au:N/C:N/I:P/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00251,"percentile":0.15562,"severity":"low","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.00251},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00251,"percentile":0.15562}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00251,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00251,"percentile":0.15562}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-276","name":"Incorrect Default Permissions","description":"During installation, installed file permissions are set to allow anyone to modify those files.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/276.html"}],"affected":[{"vendor":"ubuntu","product":"ruby-octokit","name":"ruby-octokit","label":"ruby-octokit","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby-octokit","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"RubyGems","product":"octokit","name":"octokit","label":"octokit","ecosystem":"RubyGems","cpePart":null,"purl":"pkg:gem/octokit","purlType":"gem","versions":[{"text":"≥ 4.23.0, < 4.25.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.23.0, < 4.25.0","eol":null,"hubHref":null},{"vendor":"octokit_project","product":"octokit","name":"octokit","label":"octokit","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"4.23.0","noFixRecorded":false,"fixedIn":null},{"text":"4.24.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"4.23.0 | 4.24.0","eol":null,"hubHref":"/vendor/octokit_project/octokit"},{"vendor":"octokit","product":"octokit.rb","name":"octokit.rb","label":"octokit.rb","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 4.23.0, < 4.25.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.23.0, < 4.25.0","eol":null,"hubHref":"/vendor/octokit/octokitrb"}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/octokit/octokit.rb/security/advisories/GHSA-g28x-pgr3-qqx6","label":"github.com/octokit/octokit.rb/security/advisories/GHSA-g28x-pgr3-qqx6","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","WEB","Third Party Advisory"]},{"url":"https://github.com/octokit/octokit.rb/commit/1c8edecc9cf23d1ceb959d91a416a69f55ce7d55","label":"github.com/octokit/octokit.rb/commit/1c8edecc9cf23d1ceb959d91a416a69f55ce7d55","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Patch","Third Party Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-31072","label":"ubuntu.com/security/CVE-2022-31072","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-31072","label":"www.cve.org/CVERecord?id=CVE-2022-31072","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31072","label":"nvd.nist.gov/vuln/detail/CVE-2022-31072","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/octokit/octokit.rb","label":"github.com/octokit/octokit.rb","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/octokit/CVE-2022-31072.yml","label":"github.com/rubysec/ruby-advisory-db/blob/master/gems/octokit/CVE-2022-31072.yml","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-06-15T22:35:10.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-23T18:11:25.606Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":13,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T14:59:27.496Z","stale":false,"partial":false}}