Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2022-31071: CWE-276: Incorrect Default Permissions in octokit octopoller.rb

0
Medium
Published: Wed Jun 15 2022 (06/15/2022, 22:35:15 UTC)
Source: CVE
Vendor/Project: octokit
Product: octopoller.rb

Description

Octopoller is a micro gem for polling and retrying. Version 0.2.0 of the octopoller gem was 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 Octopoller 0.3.0. Two workarounds are available. Users can use the previous version of the gem, v0.1.0. Alternatively, users can modify the file permissions manually until they are able to upgrade to the latest version.

AI-Powered Analysis

AILast updated: 06/23/2025, 04:50:45 UTC

Technical Analysis

CVE-2022-31071 is a security vulnerability identified in version 0.2.0 of the Octopoller Ruby gem, which is part of the Octokit project. Octopoller is a micro gem designed to facilitate polling and retrying operations in Ruby applications. The vulnerability arises from incorrect default file permissions set during the packaging of the gem. Specifically, files within the gem were assigned world-writable permissions (0666 or -rw-rw-rw-), allowing any user with access to the system where the gem is installed to modify these files. This is a classic example of CWE-276: Incorrect Default Permissions. Such overly permissive file settings can lead to unauthorized modification of the gem's files, potentially enabling attackers or malicious insiders to inject malicious code or alter the gem's behavior, thereby compromising the confidentiality, integrity, and availability of applications relying on this gem. The issue was addressed in Octopoller version 0.3.0, which corrected the file permissions to a more secure setting (typically 0644 or -rw-r--r--). Until users can upgrade, two workarounds are recommended: either revert to the previous version 0.1.0, which does not have this issue, or manually adjust the file permissions to restrict write access. There are no known exploits in the wild, and the vulnerability requires local access to the system where the gem is installed. No authentication or user interaction is needed beyond having access to the affected environment.

Potential Impact

For European organizations, the impact of this vulnerability depends largely on the deployment context of the Octopoller gem. Organizations using Ruby applications that incorporate Octopoller 0.2.0 may face risks of unauthorized modification of gem files by any user with access to the host system. This can lead to code injection, privilege escalation, or persistent backdoors, undermining application integrity and potentially exposing sensitive data. The vulnerability primarily threatens internal systems where multiple users have access or where attackers have gained limited footholds. Given that Octopoller is a niche gem, the overall exposure might be limited, but critical sectors such as finance, healthcare, and government that rely on Ruby-based infrastructure could be at higher risk if they use this gem version. Additionally, supply chain risks exist if the gem is part of larger software stacks. The vulnerability does not directly enable remote exploitation but could be leveraged in multi-stage attacks following initial access. The impact on availability is moderate, as malicious modifications could disrupt application functionality. Confidentiality and integrity impacts are more significant due to the potential for code tampering.

Mitigation Recommendations

European organizations should immediately audit their Ruby environments to identify installations of Octopoller version 0.2.0. If found, the primary mitigation is to upgrade to Octopoller version 0.3.0, which corrects the file permissions issue. If immediate upgrading is not feasible, organizations should manually correct file permissions on the installed gem files to remove world-write access, setting permissions to 0644 or more restrictive. Additionally, organizations should enforce strict access controls on servers hosting Ruby applications, limiting user accounts and privileges to reduce the risk of unauthorized file modifications. Implementing file integrity monitoring (FIM) can help detect unauthorized changes to gem files. Regularly scanning for outdated or vulnerable dependencies using software composition analysis (SCA) tools is recommended. Finally, organizations should review internal policies to restrict write permissions on application libraries and ensure secure software supply chain practices.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-05-18T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9844c4522896dcbf34ab

Added to database: 5/21/2025, 9:09:24 AM

Last enriched: 6/23/2025, 4:50:45 AM

Last updated: 2/4/2026, 12:27:23 AM

Views: 28

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats