CVE-2019-8320: A Directory Traversal issue was discovered in RubyGems 2.7.6 and later through 3.0.2.
Noroxi assessment
Priority: Monitor (action score 30/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 4.1% (FIRST EPSS); higher than 91% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. Special conditions such as timing or configuration are required.
- Fixed version: rubygem-abrt (AlmaLinux:8) 0.3.0-4.module_el8.5.0+2625+ec418553, 0.3.0-4.module_el8.5.0+2623+08a8ba32, 0.3.0-4.module_el8.5.0+259+8cec6917; rubygem-abrt-doc (AlmaLinux:8) 0.3.0-4.module_el8.5.0+2623+08a8ba32, 0.3.0-4.module_el8.5.0+259+8cec6917, 0.3.0-4.module_el8.5.0+2625+ec418553; rubygem-bson (AlmaLinux:8) 4.3.0-2.module_el8.5.0+259+8cec6917, 4.3.0-2.module_el8.5.0+2625+ec418553.
Low priority for now. Upgrade to rubygem-abrt (AlmaLinux:8) 0.3.0-4.module_el8.5.0+2625+ec418553, 0.3.0-4.module_el8.5.0+2623+08a8ba32, 0.3.0-4.module_el8.5.0+259+8cec6917; rubygem-abrt-doc (AlmaLinux:8) 0.3.0-4.module_el8.5.0+2623+08a8ba32, 0.3.0-4.module_el8.5.0+259+8cec6917, 0.3.0-4.module_el8.5.0+2625+ec418553; rubygem-bson (AlmaLinux:8) 4.3.0-2.module_el8.5.0+259+8cec6917, 4.3.0-2.module_el8.5.0+2625+ec418553 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
A Directory Traversal issue was discovered in RubyGems 2.7.6 and later through 3.0.2. Before making new directories or touching files (which now include path-checking code for symlinks), it would delete the target destination. If that destination was hidden behind a symlink, a malicious gem could delete arbitrary files on the user's machine, presuming the attacker could guess at paths. Given how frequently gem is run as sudo, and how predictable paths are on modern systems (/tmp, /usr, etc.), this could likely lead to data loss or an unusable system.
- Published
- Jun 6, 2019
- Updated
- Jun 16, 2026
- EPSS
- 4.1% · 91th percentile
- CWE
- CWE-22
Report tools
Action score
30
Low priority for now.
- CVSS
- 29 / 40 · 7.4 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 4.1%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| rubygems | rubygems | cpe:2.3:a:rubygems:rubygems |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- rubygems rubygems2.7.6 and later · up to 3.0.2 inclusive
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | rubygem-abrt | before 0.3.0-4.module_el8.5.0+2625+ec418553 | 0.3.0-4.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-abrt | before 0.3.0-4.module_el8.5.0+2623+08a8ba32 | 0.3.0-4.module_el8.5.0+2623+08a8ba32 |
| AlmaLinux:8 | rubygem-abrt | before 0.3.0-4.module_el8.5.0+259+8cec6917 | 0.3.0-4.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-abrt-doc | before 0.3.0-4.module_el8.5.0+2623+08a8ba32 | 0.3.0-4.module_el8.5.0+2623+08a8ba32 |
| AlmaLinux:8 | rubygem-abrt-doc | before 0.3.0-4.module_el8.5.0+259+8cec6917 | 0.3.0-4.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-abrt-doc | before 0.3.0-4.module_el8.5.0+2625+ec418553 | 0.3.0-4.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-bson | before 4.3.0-2.module_el8.5.0+259+8cec6917 | 4.3.0-2.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-bson | before 4.3.0-2.module_el8.5.0+2625+ec418553 | 4.3.0-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-bson-doc | before 4.3.0-2.module_el8.5.0+259+8cec6917 | 4.3.0-2.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-bson-doc | before 4.3.0-2.module_el8.5.0+2625+ec418553 | 4.3.0-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-mongo | before 2.5.1-2.module_el8.5.0+259+8cec6917 | 2.5.1-2.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-mongo | before 2.5.1-2.module_el8.5.0+2625+ec418553 | 2.5.1-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-mongo-doc | before 2.5.1-2.module_el8.5.0+259+8cec6917 | 2.5.1-2.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-mongo-doc | before 2.5.1-2.module_el8.5.0+2625+ec418553 | 2.5.1-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-mysql2 | before 0.4.10-4.module_el8.5.0+2625+ec418553 | 0.4.10-4.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-mysql2 | before 0.4.10-4.module_el8.5.0+259+8cec6917 | 0.4.10-4.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-mysql2-doc | before 0.4.10-4.module_el8.5.0+2625+ec418553 | 0.4.10-4.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-mysql2-doc | before 0.4.10-4.module_el8.5.0+259+8cec6917 | 0.4.10-4.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-pg | before 1.0.0-2.module_el8.5.0+259+8cec6917 | 1.0.0-2.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-pg | before 1.0.0-2.module_el8.5.0+2625+ec418553 | 1.0.0-2.module_el8.5.0+2625+ec418553 |
| AlmaLinux:8 | rubygem-pg-doc | before 1.0.0-2.module_el8.5.0+259+8cec6917 | 1.0.0-2.module_el8.5.0+259+8cec6917 |
| AlmaLinux:8 | rubygem-pg-doc | before 1.0.0-2.module_el8.5.0+2625+ec418553 | 1.0.0-2.module_el8.5.0+2625+ec418553 |
| Alpine:v3.6 | ruby | before 2.4.6-r0 | 2.4.6-r0 |
| Alpine:v3.8 | ruby | before 2.5.5-r0 | 2.5.5-r0 |
+96
Same product
rubygems: all recordsOther highest-scoring records for the same primary product.
- CVE-2017-0903RubyGems versions between 2.0.0 and 2.6.13 are vulnerable to a possible remote code execution vulnerability.44Plan
- CVE-2017-0899RubyGems version 2.6.12 and earlier is vulnerable to maliciously crafted gem specifications that include terminal escape characters.42Plan
- CVE-2018-1000076RubyGems version Ruby 2.2 series: 2.2.9 and earlier, Ruby 2.3 series: 2.3.6 and earlier, Ruby 2.4 series: 2.4.3 and earlier, Ruby 2.5…40Plan
Published before and after this one in the same product
- ← EarlierCVE-2018-1000078Mar 13, 2018 · RubyGems version Ruby 2.2 series: 2.2.9 and earlier, Ruby 2.3 series: 2.3.6 and earlier, Ruby 2.4 series: 2.4.3 and earlier, Ruby 2.5…25Monitor
- ← EarlierCVE-2018-1000079Mar 13, 2018 · RubyGems version Ruby 2.2 series: 2.2.9 and earlier, Ruby 2.3 series: 2.3.6 and earlier, Ruby 2.4 series: 2.4.3 and earlier, Ruby 2.5…23Monitor
- Later →CVE-2019-8324Jun 17, 2019 · An issue was discovered in RubyGems 2.6 and later through 3.0.2.36Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:rubygem-abrt | 0.3.0-4.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-abrt-doc | 0.3.0-4.module_el8.5.0+259+8cec6917 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-bson | 4.3.0-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-bson-doc | 4.3.0-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-mongo | 2.5.1-2.module_el8.5.0+259+8cec6917 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-mongo-doc | 2.5.1-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-mysql2 | 0.4.10-4.module_el8.5.0+259+8cec6917 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-mysql2-doc | 0.4.10-4.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-pg | 1.0.0-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:rubygem-pg-doc | 1.0.0-2.module_el8.5.0+2625+ec418553 · AlmaLinux:8 | Package registry (OSV) |
| alpine:ruby | 2.4.6-r0 · Alpine:v3.6 | Package registry (OSV) |
| debian:jruby | 9.1.17.0-3 · Debian:12 | Package registry (OSV) |
| debian:ruby2.1 | 2.1.5-2+deb8u7 · Debian:8 | Package registry (OSV) |
| debian:ruby2.3 | 2.3.3-1+deb9u6 · Debian:9 | Package registry (OSV) |
| debian:rubygems | 3.2.0~rc.1-1 · Debian:12 | Package registry (OSV) |
| opensuse:ruby-bundled-gems-rpmhelper | 0.0.2-lp151.2.1 · openSUSE:Leap 15.0 | Package registry (OSV) |
| opensuse:ruby2.5 | 2.5.5-lp151.4.3.1 · openSUSE:Leap 15.0 | Package registry (OSV) |
| red hat:ruby | 0:2.5.5-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-debuginfo | 0:2.5.5-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-debugsource | 0:2.5.5-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-devel | 0:2.5.5-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-doc | 0:2.5.5-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-irb | 0:2.5.5-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-libs | 0:2.5.5-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:ruby-libs-debuginfo | 0:2.5.5-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-abrt | 0:0.3.0-4.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-abrt-doc | 0:0.3.0-4.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-bigdecimal | 0:1.3.4-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rubygem-bigdecimal-debuginfo | 0:1.3.4-105.module+el8.1.0+3656+f80bfa1d · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| RubyGems:rubygems-update | 2.7.9 | Package registry (OSV) |
+2
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- none
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')CVSS vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
nvd-primary
Root cause
A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.
The bug in code
The whole CWE-22 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const file = path.join(ROOT, req.query.name);
res.sendFile(file);Fixed
const file = path.resolve(ROOT, req.query.name);
if (!file.startsWith(ROOT + path.sep)) {
return res.sendStatus(400);
}
res.sendFile(file);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Path TraversalCAPEC-126likelihood: High · Very High
- Using Slashes and URL Encoding Combined to Bypass Validation LogicCAPEC-64likelihood: High · High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
- Using Escaped Slashes in Alternate EncodingCAPEC-78likelihood: High · High
- Using Slashes in Alternate EncodingCAPEC-79likelihood: High · High
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (3 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.