CVE-2026-82455

7.1

Ruby · RubyGems

RubyGems is vulnerable to a path traversal flaw during gem extraction, caused by improper validation of filesystem symlinks, which could allow files to be written outside the intended directory.

Executive summary

A critical path traversal vulnerability in RubyGems allows local attackers to bypass extraction boundaries, posing a significant risk to system file integrity.

Vulnerability

This vulnerability is a result of improper link resolution (CWE-59) where the software fails to correctly validate path containment during the extraction process. An attacker can leverage existing symlinks to escape the extraction root, potentially overwriting critical system files when a user performs a gem installation.

Business impact

The exploitation of this vulnerability could lead to unauthorized file modification or corruption, potentially resulting in system instability or privilege escalation. With a CVSS score of 7.1, this is considered a High severity flaw, as it undermines the security boundary of the RubyGems package manager, which is a foundational component for many development and production environments.

Remediation

Immediate Action: Update RubyGems to version 4.0.13 or later to ensure the inclusion of the path validation fix.

Proactive Monitoring: Audit logs for unusual file write operations or unexpected symlink creation events during automated build or deployment cycles.

Compensating Controls: Ensure that gem installation processes are executed within isolated, low-privilege containers or sandboxed environments to minimize the impact of potential file system traversal.

Exploitation status

Public Exploit Available: Unknown.

Analyst recommendation

Given the potential for arbitrary file write, organizations should prioritize updating RubyGems across all development and production environments. Implementing this update is the only effective way to resolve the underlying logic error in path validation and prevent unauthorized file system access.

More Ruby CVEs

Sources

Originally found and disclosed by Ali Firas, per the CVE Program record.