Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 957182 (CVE-2011-10007)

Summary: <dev-perl/File-Find-Rule-0.350.0: Arbitrary Code Execution when grep() encounters a crafted file name
Product: Gentoo Security Reporter: Sam James <sam>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: IN_PROGRESS ---    
Severity: normal CC: perl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://lists.security.metacpan.org/cve-announce/msg/30183067/
See Also: https://github.com/richardc/perl-file-find-rule/pull/4
https://rt.cpan.org/Public/Bug/Display.html?id=64504
https://bugs.gentoo.org/show_bug.cgi?id=949498
Whiteboard: B2 [stable glsa+]
Package list:
Runtime testing required: ---
Bug Depends on: 957183    
Bug Blocks:    

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-06-05 18:18:41 UTC
"""
========================================================================
CVE-2011-10007                                       CPAN Security Group
========================================================================

         CVE ID:  CVE-2011-10007
   Distribution:  File-Find-Rule
       Versions:  through 0.34

       MetaCPAN:  https://metacpan.org/dist/File-Find-Rule
       VCS Repo:  https://github.com/richardc/perl-file-find-rule

File::Find::Rule through 0.34 for Perl is vulnerable to Arbitrary Code
Execution when `grep()` encounters a crafted file name

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)

Problem types
-------------
- CWE-78 Improper Neutralization of Special Elements used in an OS
   Command ('OS Command Injection')

Solutions
---------
Users should update to a fixed version when available, or apply the
patch provided in the references section, or use a patched version
provided by their OS distribution
"""
Comment 1 Larry the Git Cow gentoo-dev 2025-06-05 18:21:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be864746e173558ae6ef99397c6e1f1104f4df88

commit be864746e173558ae6ef99397c6e1f1104f4df88
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-06-05 18:20:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-06-05 18:20:50 +0000

    dev-perl/File-Find-Rule: add 0.350.0
    
    Bug: https://bugs.gentoo.org/957182
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-perl/File-Find-Rule/File-Find-Rule-0.350.0.ebuild | 19 +++++++++++++++++++
 dev-perl/File-Find-Rule/Manifest                      |  1 +
 2 files changed, 20 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2025-06-12 09:57:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/glsa.git/commit/?id=065d592ea76de8de3b2a4a29f35411d4e22ab25c

commit 065d592ea76de8de3b2a4a29f35411d4e22ab25c
Author:     GLSAMaker <glsamaker@gentoo.org>
AuthorDate: 2025-06-12 09:56:52 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2025-06-12 09:57:03 +0000

    [ GLSA 202506-10 ] File-Find-Rule: Shell Injection
    
    Bug: https://bugs.gentoo.org/957182
    Signed-off-by: GLSAMaker <glsamaker@gentoo.org>
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 glsa-202506-10.xml | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)