CVE-2011-10007
Description
File::Find::Rule through 0.34 for Perl is vulnerable to Arbitrary Code Execution when grep() encounters a crafted filename.
A file handle is opened with the 2 argument form of open() allowing an attacker controlled filename to provide the MODE parameter to open(), turning the filename into a command to be executed.
Example:
$ mkdir /tmp/poc; echo > "/tmp/poc/|id" $ perl -MFile::Find::Rule \ -E 'File::Find::Rule->grep("foo")->in("/tmp/poc")' uid=1000(user) gid=1000(user) groups=1000(user),100(users)
Affected products
1Patches
2df58128bcee4Fix for CVE-2011-10007: Use 3 arg open in grep()`
1 file changed · +1 −1
lib/File/Find/Rule.pm+1 −1 modified@@ -420,7 +420,7 @@ sub grep { $self->exec( sub { local *FILE; - open FILE, $_ or return; + open FILE, '<', $_ or return; local ($_, $.); while (<FILE>) { for my $p (@pattern) {
8ee2b3d13e08Merge pull request #4 from stigtsp/CVE-2011-10007
1 file changed · +1 −1
lib/File/Find/Rule.pm+1 −1 modified@@ -420,7 +420,7 @@ sub grep { $self->exec( sub { local *FILE; - open FILE, $_ or return; + open FILE, '<', $_ or return; local ($_, $.); while (<FILE>) { for my $p (@pattern) {
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- www.openwall.com/lists/oss-security/2025/06/05/4nvd
- www.openwall.com/lists/oss-security/2025/06/06/1nvd
- www.openwall.com/lists/oss-security/2025/06/06/3nvd
- github.com/richardc/perl-file-find-rule/commit/df58128bcee4c1da78c34d7f3fe1357e575ad56f.patchnvd
- github.com/richardc/perl-file-find-rule/pull/4nvd
- lists.debian.org/debian-lts-announce/2025/06/msg00006.htmlnvd
- metacpan.org/release/RCLAMP/File-Find-Rule-0.34/source/lib/File/Find/Rule.pmnvd
- rt.cpan.org/Public/Bug/Display.htmlnvd
News mentions
0No linked articles in our index yet.