{"answers":{"affected":"2 open source packages ship an affected version, including octokit. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31072 in the wild and no public exploit code.","fix":"Upgrade octokit to 4.25.0 or later.","what":"CVE-2022-31072 is a low-severity vulnerability in octokit.rb, published on 15 Jun 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31072 and fix it if it is affected.\n\nWhat it is: CVE-2022-31072 is a low-severity vulnerability in octokit.rb, published on 15 Jun 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31072 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- octokit (RubyGems): affected from 4.23.0; fixed in 4.25.0\n- octokit (RubyGems): affected from 4.23.0; fixed in 4.25.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31072/ (Markdown: https://insights.sbomify.com/CVE-2022-31072/index.md)","id":"CVE-2022-31072","markdown":"https://insights.sbomify.com/CVE-2022-31072/index.md","name":"CVE-2022-31072","record":{"aliases":["GHSA-g28x-pgr3-qqx6","UBUNTU-CVE-2022-31072"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Ruby GitHub API library","requires_auth":"low_privilege","summary":"Local attackers can modify world-writable files in the Octokit gem, potentially altering library behavior or injecting malicious code.","user_interaction":"not_required","vuln_class":"misconfiguration"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"octokit","vendor":"octokit_project"}],"cvss":{"score":2.5,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-276","name":"Incorrect Default Permissions"}],"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.","ecosystems":["RubyGems"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Octokit gem published with world-writable files","id":"CVE-2022-31072","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"misconfiguration","year":"2022"},"n_packages":2,"n_references":2,"next":{"headline":"KubeEdge Edge ServiceBus module DoS","id":"CVE-2022-31073"},"packages":[{"ecosystem":"RubyGems","fixed":["4.25.0"],"introduced":["4.23.0"],"last_affected":[],"package":"octokit","purl":null,"source":"GHSA-g28x-pgr3-qqx6"},{"ecosystem":"RubyGems","fixed":["4.25.0"],"introduced":["4.23.0"],"last_affected":[],"package":"octokit","purl":"pkg:gem/octokit","source":"GHSA-g28x-pgr3-qqx6"}],"prev":{"headline":"Octopoller gem published with world-writable files","id":"CVE-2022-31071"},"products":["octokit.rb"],"published":"2022-06-15","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["octokit"]},"summary":"Local attackers can modify world-writable files in the Octokit gem, potentially altering library behavior or injecting malicious code.","url":"https://insights.sbomify.com/CVE-2022-31072/"}