6.9
Medium
CVE-2026-82455 RubyGems fails to re-validate path containment after filesystem symlink resolution during gem extraction
Description
RubyGems fails to re-validate path containment after filesystem symlink resolution during gem extraction. When a pre-existing symlink inside the destination directory points outside the extraction root, extracted files that appear to be written under the destination directory can instead be written outside of it, breaking the extraction safety boundary. The fix resolves the real path of the parent directory before writing and raises Gem::Package::PathError if it escapes the destination directory.
Affected products and versions
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems 3.2 | 3.2.30 → < 4.0.13 | 4.0.13 |
References
- Pull Request #9493 github.com
- Patch Commit github.com
- github.com github.com
- VulnCheck Advisory: RubyGems before 4.0.13 Path Traversal via Symlink Resolution www.vulncheck.com
Timeline
- Published
- Last modified