{"id":"ALPINE-CVE-2019-8320","details":"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.","modified":"2025-11-19T06:03:33.239654Z","published":"2019-06-06T15:29:01.420Z","upstream":["CVE-2019-8320"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2019-8320"}],"affected":[{"package":{"name":"ruby","ecosystem":"Alpine:v3.6","purl":"pkg:apk/alpine/ruby?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.6-r0"}]}],"versions":["1.8.7_p160-r2","1.8.7_p160-r3","1.8.7_p174-r0","1.8.7_p174-r1","1.8.7_p174-r2","1.8.7_p174-r3","1.8.7_p174-r4","1.8.7_p174-r6","1.8.7_p174-r7","1.8.7_p299-r0","1.8.7_p299-r1","1.8.7_p299-r2","1.8.7_p352-r0","1.8.7_p352-r1","1.8.7_p358-r1","1.8.7_p72-r1","1.8.7_p72-r2","1.9.3_p194-r0","1.9.3_p286-r0","1.9.3_p286-r1","1.9.3_p286-r2","1.9.3_p327-r0","1.9.3_p362-r0","1.9.3_p374-r0","1.9.3_p385-r0","1.9.3_p392-r0","2.0.0_p0-r0","2.0.0_p0-r1","2.0.0_p195-r0","2.0.0_p247-r0","2.0.0_p247-r1","2.0.0_p247-r2","2.0.0_p247-r3","2.0.0_p353-r0","2.0.0_p353-r1","2.0.0_p353-r2","2.0.0_p481-r0","2.1.5-r0","2.1.5-r1","2.2.1-r0","2.2.2-r0","2.2.2-r1","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.3.1-r0","2.3.1-r1","2.3.1-r2","2.3.2-r0","2.3.3-r0","2.3.3-r1","2.3.3-r2","2.3.3-r3","2.4.0-r3","2.4.1-r1","2.4.1-r2","2.4.1-r3","2.4.2-r0","2.4.3-r0","2.4.4-r0","2.4.5-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-8320.json"}},{"package":{"name":"ruby","ecosystem":"Alpine:v3.7","purl":"pkg:apk/alpine/ruby?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.6-r0"}]}],"versions":["1.8.7_p160-r2","1.8.7_p160-r3","1.8.7_p174-r0","1.8.7_p174-r1","1.8.7_p174-r2","1.8.7_p174-r3","1.8.7_p174-r4","1.8.7_p174-r6","1.8.7_p174-r7","1.8.7_p299-r0","1.8.7_p299-r1","1.8.7_p299-r2","1.8.7_p352-r0","1.8.7_p352-r1","1.8.7_p358-r1","1.8.7_p72-r1","1.8.7_p72-r2","1.9.3_p194-r0","1.9.3_p286-r0","1.9.3_p286-r1","1.9.3_p286-r2","1.9.3_p327-r0","1.9.3_p362-r0","1.9.3_p374-r0","1.9.3_p385-r0","1.9.3_p392-r0","2.0.0_p0-r0","2.0.0_p0-r1","2.0.0_p195-r0","2.0.0_p247-r0","2.0.0_p247-r1","2.0.0_p247-r2","2.0.0_p247-r3","2.0.0_p353-r0","2.0.0_p353-r1","2.0.0_p353-r2","2.0.0_p481-r0","2.1.5-r0","2.1.5-r1","2.2.1-r0","2.2.2-r0","2.2.2-r1","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.3.1-r0","2.3.1-r1","2.3.1-r2","2.3.2-r0","2.3.3-r0","2.3.3-r1","2.3.3-r2","2.3.3-r3","2.4.0-r3","2.4.1-r1","2.4.1-r2","2.4.1-r3","2.4.1-r4","2.4.1-r5","2.4.2-r0","2.4.2-r1","2.4.3-r0","2.4.4-r0","2.4.5-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-8320.json"}},{"package":{"name":"ruby","ecosystem":"Alpine:v3.8","purl":"pkg:apk/alpine/ruby?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.5-r0"}]}],"versions":["1.8.7_p160-r2","1.8.7_p160-r3","1.8.7_p174-r0","1.8.7_p174-r1","1.8.7_p174-r2","1.8.7_p174-r3","1.8.7_p174-r4","1.8.7_p174-r6","1.8.7_p174-r7","1.8.7_p299-r0","1.8.7_p299-r1","1.8.7_p299-r2","1.8.7_p352-r0","1.8.7_p352-r1","1.8.7_p358-r1","1.8.7_p72-r1","1.8.7_p72-r2","1.9.3_p194-r0","1.9.3_p286-r0","1.9.3_p286-r1","1.9.3_p286-r2","1.9.3_p327-r0","1.9.3_p362-r0","1.9.3_p374-r0","1.9.3_p385-r0","1.9.3_p392-r0","2.0.0_p0-r0","2.0.0_p0-r1","2.0.0_p195-r0","2.0.0_p247-r0","2.0.0_p247-r1","2.0.0_p247-r2","2.0.0_p247-r3","2.0.0_p353-r0","2.0.0_p353-r1","2.0.0_p353-r2","2.0.0_p481-r0","2.1.5-r0","2.1.5-r1","2.2.1-r0","2.2.2-r0","2.2.2-r1","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.3.1-r0","2.3.1-r1","2.3.1-r2","2.3.2-r0","2.3.3-r0","2.3.3-r1","2.3.3-r2","2.3.3-r3","2.4.0-r3","2.4.1-r1","2.4.1-r2","2.4.1-r3","2.4.1-r4","2.4.1-r5","2.4.2-r0","2.4.2-r1","2.4.3-r0","2.5.0-r0","2.5.0-r1","2.5.1-r0","2.5.1-r1","2.5.1-r2","2.5.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-8320.json"}},{"package":{"name":"ruby","ecosystem":"Alpine:v3.9","purl":"pkg:apk/alpine/ruby?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.5-r0"}]}],"versions":["1.8.7_p160-r2","1.8.7_p160-r3","1.8.7_p174-r0","1.8.7_p174-r1","1.8.7_p174-r2","1.8.7_p174-r3","1.8.7_p174-r4","1.8.7_p174-r6","1.8.7_p174-r7","1.8.7_p299-r0","1.8.7_p299-r1","1.8.7_p299-r2","1.8.7_p352-r0","1.8.7_p352-r1","1.8.7_p358-r1","1.8.7_p72-r1","1.8.7_p72-r2","1.9.3_p194-r0","1.9.3_p286-r0","1.9.3_p286-r1","1.9.3_p286-r2","1.9.3_p327-r0","1.9.3_p362-r0","1.9.3_p374-r0","1.9.3_p385-r0","1.9.3_p392-r0","2.0.0_p0-r0","2.0.0_p0-r1","2.0.0_p195-r0","2.0.0_p247-r0","2.0.0_p247-r1","2.0.0_p247-r2","2.0.0_p247-r3","2.0.0_p353-r0","2.0.0_p353-r1","2.0.0_p353-r2","2.0.0_p481-r0","2.1.5-r0","2.1.5-r1","2.2.1-r0","2.2.2-r0","2.2.2-r1","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.3.1-r0","2.3.1-r1","2.3.1-r2","2.3.2-r0","2.3.3-r0","2.3.3-r1","2.3.3-r2","2.3.3-r3","2.4.0-r3","2.4.1-r1","2.4.1-r2","2.4.1-r3","2.4.1-r4","2.4.1-r5","2.4.2-r0","2.4.2-r1","2.4.3-r0","2.5.0-r0","2.5.0-r1","2.5.1-r0","2.5.1-r1","2.5.1-r2","2.5.2-r0","2.5.3-r0","2.5.3-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-8320.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H"}]}