CVE-2017-6512
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for...
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.9
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic.
- Record
CVE-2017-6512- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-362
- Updated
- 2026-11-02
CVE List No score
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic.
- Record
CVE-2017-6512- Updated
- 2026-11-02
EUVDEUVD-2017-15568 No score
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic.
- Record
EUVD-2017-15568- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-wf3v-xjg6-86hx
5.9
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for...
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic.
- Record
GHSA-wf3v-xjg6-86hx- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-362
- Updated
- 2026-11-02
OSV
5.9
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic.
- Record
CVE-2017-6512- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2017-6512
5.9
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic.
- Record
DEBIAN-CVE-2017-6512- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
Show 9 moreShow less
OSVUBUNTU-CVE-2017-6512
5.9
Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic.
- Record
UBUNTU-CVE-2017-6512- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - CVSS 3.0
- 5.9 Medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVMGASA-2018-0047 No score
Updated perl packages fix security vulnerability
John Lightsey and Todd Rinaldo reported that the opportunistic loading of optional modules can make many programs unintentionally load code from the current working directory (which might be changed to another directory without the user realising) and potentially leading to privilege escalation (CVE-2016-1238).
The cPanel Security Team reported a time of check to time of use (TOCTTOU) race condition flaw in File::Path, a core module from Perl to create or remove directory trees. An attacker can take advantage of this flaw to set the mode on an attacker-chosen file to a attacker-chosen value (CVE-2017-6512).
Jakub Wilk reported a heap buffer overflow flaw in the regular expression compiler, allowing a remote attacker to cause a denial of service via a specially crafted regular expression with the case-insensitive modifier (CVE-2017-12837).
Jakub Wilk reported a buffer over-read flaw in the regular expression parser, allowing a remote attacker to cause a denial of service or information leak (CVE-2017-12883).
The perl-libintl-perl, perl-MIME-Charset, perl-MIME-EncWords, perl-Module-Build, perl-Sys-Syslog, and perl-Unicode-LineBreak packages have been patched and the perl-Module-Load-Conditional and perl-Net-DNS packages have been updated to fix CVE-2016-1238 as well.
The perl-File-Path package has also been patched to fix CVE-2017-6512.
- Record
MGASA-2018-0047- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:13154-1 No score
perl-File-Path-2.180000-1.15 on GA media
These are all security issues fixed in the perl-File-Path-2.180000-1.15 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:13154-1- Updated
- 2026-11-02
OSVSUSE-SU-2017:2951-1 No score
Security update for perl
This update for perl fixes the following issues:
Security issue fixed:
- CVE-2017-6512: Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic. (bnc#1047178)
Bug fixes:
- reformat baselibs.conf as source validator workaround
- Record
SUSE-SU-2017:2951-1- Updated
- 2026-11-02
OSVSUSE-SU-2017:3092-1 No score
Security update for perl
This update for perl fixes the following issues:
Security issues fixed:
- CVE-2017-12837: Heap-based buffer overflow in the S_regatom function in regcomp.c in Perl 5 before 5.24.3-RC1 and 5.26.x before 5.26.1-RC1 allows remote attackers to cause a denial of service (out-of-bounds write) via a regular expression with a '\N{}' escape and the case-insensitive modifier. (bnc#1057724)
- CVE-2017-12883: Buffer overflow in the S_grok_bslash_N function in regcomp.c in Perl 5 before 5.24.3-RC1 and 5.26.x before 5.26.1-RC1 allows remote attackers to disclose sensitive information or cause a denial of service (application crash) via a crafted regular expression with an invalid '\N{U+...}' escape. (bnc#1057721)
- CVE-2017-6512: Race condition in the rmtree and remove_tree functions in the File-Path module before 2.13 for Perl allows attackers to set the mode on arbitrary files via vectors involving directory-permission loosening logic. (bnc#1047178)
Bug fixes:
- backport set_capture_string changes from upstream (bsc#999735)
- reformat baselibs.conf as source validator workaround
- Record
SUSE-SU-2017:3092-1- Updated
- 2026-11-02
OSVSUSE-SU-2021:0449-1 No score
Security update for perl-File-Path
This update for perl-File-Path fixes the following issues:
- Provide
File::Pathversion 2.15 to SLE-12-SP5 (jsc#SLE-17088, jsc#ECO-3050) - CVE-2017-6512: fix a race condition in the
File-Pathmodule for Perl.
- Record
SUSE-SU-2021:0449-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:3271-1 No score
Security update for perl
This update for perl fixes the following issues:
- CVE-2017-6512: Fixed File::Path rmtree/remove_tree race condition (bsc#1047178).
- Record
SUSE-SU-2022:3271-1- Updated
- 2026-11-02
OSVSUSE-SU-2024:1630-1 No score
Security update for perl
This update for perl fixes the following issues:
Security issues fixed:
- CVE-2018-6913: Fixed space calculation issues in pp_pack.c (bsc#1082216)
- CVE-2018-6798: Fixed heap buffer overflow in regexec.c (bsc#1082233)
- CVE-2023-31484: Enabled TLS certificate verification in CPAN (bsc#1210999)
- CVE-2017-6512: Fixed File::Path rmtree/remove_tree race condition (bsc#1047178)
- Record
SUSE-SU-2024:1630-1- Updated
- 2026-11-02
OSVUSN-3625-1 No score
perl vulnerabilities
It was discovered that Perl incorrectly handled certain regular expressions. An attacker could possibly use this issue to cause Perl to hang, resulting in a denial of service. This issue only affected Ubuntu 14.04 LTS. (CVE-2015-8853)
It was discovered that Perl incorrectly loaded libraries from the current working directory. A local attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 14.04 LTS and Ubuntu 16.04 LTS. (CVE-2016-6185)
It was discovered that Perl incorrectly handled the rmtree and remove_tree functions. A local attacker could possibly use this issue to set the mode on arbitrary files. This issue only affected Ubuntu 14.04 LTS and Ubuntu 16.04 LTS. (CVE-2017-6512)
Brian Carpenter discovered that Perl incorrectly handled certain regular expressions. An attacker could use this issue to cause Perl to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue has only been addressed in Ubuntu 16.04 LTS and Ubuntu 17.10. (CVE-2018-6797)
Nguyen Duc Manh discovered that Perl incorrectly handled certain regular expressions. An attacker could use this issue to cause Perl to crash, resulting in a denial of service. This issue only affected Ubuntu 16.04 LTS and Ubuntu 17.10. (CVE-2018-6798)
GwanYeong Kim discovered that Perl incorrectly handled certain data when using the pack function. An attacker could use this issue to cause Perl to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2018-6913)
- Record
USN-3625-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
perlDebian:12 |
before 5.24.1-3 | 5.24.1-3 |
perlDebian:13 |
before 5.24.1-3 | 5.24.1-3 |
perlDebian:14 |
before 5.24.1-3 | 5.24.1-3 |
perlDebian:7 |
before 5.14.2-21+deb7u5, plus listed versions 5.14.2-215.14.2-21+deb7u15.14.2-21+deb7u25.14.2-21+deb7u35.14.2-21+deb7u4 |
5.14.2-21+deb7u5 |
perlDebian:8 |
before 5.20.2-3+deb8u7, plus listed versions 5.20.2-35.20.2-3+deb8u15.20.2-3+deb8u25.20.2-3+deb8u35.20.2-3+deb8u3+kbsd15.20.2-3+deb8u45.20.2-3+deb8u55.20.2-3+deb8u6 |
5.20.2-3+deb8u7 |
perlMageia:5 |
before 5.20.1-8.7.mga5 | 5.20.1-8.7.mga5 |
perl-libintl-perlMageia:5 |
before 1.230.0-6.1.mga5 | 1.230.0-6.1.mga5 |
perl-MIME-CharsetMageia:5 |
before 1.11.1-4.1.mga5 | 1.11.1-4.1.mga5 |
perl-MIME-EncWordsMageia:5 |
before 1.14.2-4.1.mga5 | 1.14.2-4.1.mga5 |
perl-Module-BuildMageia:5 |
before 0.421.0-5.1.mga5 | 0.421.0-5.1.mga5 |
Show 34 moreShow less
| Package | Affected | Fixed |
|---|---|---|
perl-Module-Load-ConditionalMageia:5 |
before 0.680.0-1.mga5 | 0.680.0-1.mga5 |
perl-Net-DNSMageia:5 |
before 1.90.0-0.mga5 | 1.90.0-0.mga5 |
perl-Sys-SyslogMageia:5 |
before 0.330.0-7.1.mga5 | 0.330.0-7.1.mga5 |
perl-Unicode-LineBreakMageia:5 |
before 2014.60.0-5.1.mga5 | 2014.60.0-5.1.mga5 |
perl-File-PathMageia:5 |
before 2.90.0-4.1.mga5 | 2.90.0-4.1.mga5 |
perlSUSE:Linux Enterprise Software Development Kit 11 SP4 |
before 5.10.0-64.81.3.1 | 5.10.0-64.81.3.1 |
perlSUSE:Linux Enterprise Server 11 SP4 |
before 5.10.0-64.81.3.1 | 5.10.0-64.81.3.1 |
perlSUSE:Linux Enterprise Server for SAP Applications 11 SP4 |
before 5.10.0-64.81.3.1 | 5.10.0-64.81.3.1 |
perlSUSE:Linux Enterprise Desktop 12 SP2 |
before 5.18.2-12.3.1 | 5.18.2-12.3.1 |
perlSUSE:Linux Enterprise Desktop 12 SP3 |
before 5.18.2-12.3.1 | 5.18.2-12.3.1 |
perlSUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 |
before 5.18.2-12.3.1 | 5.18.2-12.3.1 |
perlSUSE:Linux Enterprise Server 12 SP2 |
before 5.18.2-12.3.1 | 5.18.2-12.3.1 |
perlSUSE:Linux Enterprise Server for SAP Applications 12 SP2 |
before 5.18.2-12.3.1 | 5.18.2-12.3.1 |
perlSUSE:Linux Enterprise Server 12 SP3 |
before 5.18.2-12.3.1 | 5.18.2-12.3.1 |
perlSUSE:Linux Enterprise Server for SAP Applications 12 SP3 |
before 5.18.2-12.3.1 | 5.18.2-12.3.1 |
perl-File-PathSUSE:Linux Enterprise Server 12 SP5 |
before 2.150000-8.3.1 | 2.150000-8.3.1 |
perl-File-PathSUSE:Linux Enterprise Server for SAP Applications 12 SP5 |
before 2.150000-8.3.1 | 2.150000-8.3.1 |
perlSUSE:Linux Enterprise Module for Basesystem 15 SP3 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlSUSE:Linux Enterprise Module for Basesystem 15 SP4 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlSUSE:Linux Enterprise Module for Development Tools 15 SP3 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlSUSE:Linux Enterprise Module for Development Tools 15 SP4 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlSUSE:Linux Enterprise Module for Package Hub 15 SP3 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlSUSE:Linux Enterprise Module for Package Hub 15 SP4 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlSUSE:Linux Enterprise Micro 5.1 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlSUSE:Linux Enterprise Micro 5.2 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlopenSUSE:Leap Micro 5.2 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlopenSUSE:Leap 15.3 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlopenSUSE:Leap 15.4 |
before 5.26.1-150300.17.11.1 | 5.26.1-150300.17.11.1 |
perlSUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS |
before 5.26.1-150000.7.18.1 | 5.26.1-150000.7.18.1 |
perlSUSE:Linux Enterprise Server 15 SP2-LTSS |
before 5.26.1-150000.7.18.1 | 5.26.1-150000.7.18.1 |
perlSUSE:Linux Enterprise Server for SAP Applications 15 SP2 |
before 5.26.1-150000.7.18.1 | 5.26.1-150000.7.18.1 |
perlUbuntu:14.04:LTS |
before 5.18.2-2ubuntu1.4, plus listed versions 5.14.2-21build15.18.1-45.18.1-4build15.18.1-55.18.2-25.18.2-2ubuntu15.18.2-2ubuntu1.15.18.2-2ubuntu1.3 |
5.18.2-2ubuntu1.4 |
perlUbuntu:16.04:LTS |
before 5.22.1-9ubuntu0.3, plus listed versions 5.20.2-65.22.1-35.22.1-45.22.1-55.22.1-75.22.1-85.22.1-95.22.1-9ubuntu0.2 |
5.22.1-9ubuntu0.3 |
perl-File-PathopenSUSE:Tumbleweed |
before 2.180000-1.15 | 2.180000-1.15 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2017-6512 is a medium vulnerability (CVSS 5.9) in Canonical Ubuntu Linux, published June 1, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.36%, the 83rd percentile. Fixed in perl 5.24.1-3.
References
cpansearch.perl.org/src/JKEENAN/File-Path-2.13/Changes
usn.ubuntu.com/3625-2
debian.org/security/2017/dsa-3873
securityfocus.com/bid/99180
securitytracker.com/id/1038610
security.gentoo.org/glsa/201709-12
Show 37 moreShow less
security.cucumberlinux.com/security/details.php?id=153
rt.cpan.org/Ticket/Display.html?id=121951
usn.ubuntu.com/3625-1
nvd.nist.gov/vuln/detail/CVE-2017-6512
github.com/advisories/GHSA-wf3v-xjg6-86hx
security-tracker.debian.org/tracker/CVE-2017-6512
advisories.mageia.org/MGASA-2018-0047.html
bugs.mageia.org/show_bug.cgi?id=19051
debian.org/security/2016/dsa-3628
debian.org/security/2017/dsa-3982
suse.com/support/update/announcement/2017/suse-su-20172951-1
bugzilla.suse.com/1047178
suse.com/security/cve/CVE-2017-6512
suse.com/support/update/announcement/2017/suse-su-20173092-1
bugzilla.suse.com/1057721
bugzilla.suse.com/1057724
bugzilla.suse.com/999735
suse.com/security/cve/CVE-2017-12837
suse.com/security/cve/CVE-2017-12883
suse.com/support/update/announcement/2021/suse-su-20210449-1
suse.com/support/update/announcement/2022/suse-su-20223271-1
suse.com/support/update/announcement/2024/suse-su-20241630-1
bugzilla.suse.com/1082216
bugzilla.suse.com/1082233
bugzilla.suse.com/1210999
suse.com/security/cve/CVE-2018-6798
suse.com/security/cve/CVE-2018-6913
suse.com/security/cve/CVE-2023-31484
ubuntu.com/security/CVE-2017-6512
ubuntu.com/security/notices/USN-3625-1
ubuntu.com/security/notices/USN-3625-2
cve.org/CVERecord?id=CVE-2017-6512
ubuntu.com/security/CVE-2015-8853
ubuntu.com/security/CVE-2016-6185
ubuntu.com/security/CVE-2018-6797
ubuntu.com/security/CVE-2018-6798
ubuntu.com/security/CVE-2018-6913