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 DescriptionFile::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 |
|
Fixed
- File-Find-Rule greater than or equal 0.35
giterlizzi
Namespace: https://github.com/giterlizzi/
gdt@cpan.org
References
- CPANSA-File-Find-Rule-2011-10007 JSON self
https://raw.githubusercontent.com/giterlizzi/perl-CPANSA-CSAF/develop/csaf/white/2025/cpansa-file-find-rule-2011-10007.json - https://github.com/richardc/perl-file-find-rule/commit/df58128bcee4c1da78c34d7f3fe1357e575ad56f.patch external
https://github.com/richardc/perl-file-find-rule/commit/df58128bcee4c1da78c34d7f3fe1357e575ad56f.patch - https://github.com/richardc/perl-file-find-rule/pull/4 external
https://github.com/richardc/perl-file-find-rule/pull/4 - https://metacpan.org/release/RCLAMP/File-Find-Rule-0.34/source/lib/File/Find/Rule.pm#L423 external
https://metacpan.org/release/RCLAMP/File-Find-Rule-0.34/source/lib/File/Find/Rule.pm#L423 - https://rt.cpan.org/Public/Bug/Display.html?id=64504 external
https://rt.cpan.org/Public/Bug/Display.html?id=64504 - http://www.openwall.com/lists/oss-security/2025/06/05/4 external
http://www.openwall.com/lists/oss-security/2025/06/05/4 - http://www.openwall.com/lists/oss-security/2025/06/06/1 external
http://www.openwall.com/lists/oss-security/2025/06/06/1 - http://www.openwall.com/lists/oss-security/2025/06/06/3 external
http://www.openwall.com/lists/oss-security/2025/06/06/3 - https://lists.debian.org/debian-lts-announce/2025/06/msg00006.html external
https://lists.debian.org/debian-lts-announce/2025/06/msg00006.html - https://github.com/richardc/perl-file-find-rule/pull/4 external
https://github.com/richardc/perl-file-find-rule/pull/4 - CVE-2011-10007 (NVD) external
https://nvd.nist.gov/vuln/detail/CVE-2011-10007
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/