CVE-2026-82455
6.9
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Summary
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 Software
| Vendor | Product | Version Range | Status |
|---|---|---|---|
| ruby | rubygems | 3.2.30 < 4.0.13 | affected |
Weaknesses
- CWE-59: Improper Link Resolution Before File Access ('Link Following')
References
- https://github.com/ruby/rubygems/pull/9493
- https://github.com/ruby/rubygems/commit/103ca4230deacb31b9fcd813de109e83b5fc71ac
- https://github.com/ruby/rubygems
- https://www.vulncheck.com/advisories/rubygems-before-4.0.13-path-traversal-via-symlink-resolution
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.