{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2011-10007","assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","state":"PUBLISHED","assignerShortName":"CPANSec","dateReserved":"2025-06-05T01:05:46.861Z","datePublished":"2025-06-05T11:57:58.654Z","dateUpdated":"2025-06-11T12:27:11.870Z"},"containers":{"cna":{"affected":[{"collectionURL":"https://cpan.org/modules","defaultStatus":"unaffected","packageName":"File-Find-Rule","product":"File::Find::Rule","programFiles":["lib/File/Find/Rule.pm"],"programRoutines":[{"name":"grep"}],"repo":"https://github.com/richardc/perl-file-find-rule","vendor":"RCLAMP","versions":[{"lessThanOrEqual":"0.34","status":"affected","version":"0","versionType":"custom"}]}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"File::Find::Rule through 0.34 for Perl is vulnerable to Arbitrary Code Execution when `grep()` encounters a crafted filename.<br><br>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.<br><br>Example:<br><br><tt>$ mkdir /tmp/poc; echo &gt; \"/tmp/poc/|id\"<br>$ perl -MFile::Find::Rule \\<br>&nbsp; &nbsp; -E 'File::Find::Rule-&gt;grep(\"foo\")-&gt;in(\"/tmp/poc\")'<br>uid=1000(user) gid=1000(user) groups=1000(user),100(users)<br></tt><br><br>"}],"value":"File::Find::Rule through 0.34 for Perl is vulnerable to Arbitrary Code Execution when `grep()` encounters a crafted filename.\n\nA 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.\n\nExample:\n\n$ mkdir /tmp/poc; echo > \"/tmp/poc/|id\"\n$ perl -MFile::Find::Rule \\\n    -E 'File::Find::Rule->grep(\"foo\")->in(\"/tmp/poc\")'\nuid=1000(user) gid=1000(user) groups=1000(user),100(users)"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-78","description":"CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')","lang":"en","type":"CWE"}]}],"providerMetadata":{"orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","shortName":"CPANSec","dateUpdated":"2025-06-11T12:27:11.870Z"},"references":[{"url":"https://metacpan.org/release/RCLAMP/File-Find-Rule-0.34/source/lib/File/Find/Rule.pm#L423"},{"tags":["issue-tracking","exploit"],"url":"https://rt.cpan.org/Public/Bug/Display.html?id=64504"},{"tags":["issue-tracking"],"url":"https://github.com/richardc/perl-file-find-rule/pull/4"},{"tags":["patch"],"url":"https://github.com/richardc/perl-file-find-rule/commit/df58128bcee4c1da78c34d7f3fe1357e575ad56f.patch"}],"solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"Users should update to a fixed version such as 0.35 or later, or apply the patch provided in the references section, or use a patched version provided by their OS distribution"}],"value":"Users should update to a fixed version such as 0.35 or later, or apply the patch provided in the references section, or use a patched version provided by their OS distribution"}],"source":{"discovery":"UNKNOWN"},"timeline":[{"lang":"en","time":"2011-01-04T23:00:00.000Z","value":"A bug was reported by Kevin Ryde to the upstream RT bugtracker described as \"grep() can truncate files\"."},{"lang":"en","time":"2025-06-04T22:00:00.000Z","value":"CPANSec became aware of the bug and started triage. Code execution impact was confirmed, a patch was made, and the author, the distros list and additional downstream vendors were notified."},{"lang":"en","time":"2025-06-05T15:32:01.000Z","value":"The author released File::Find::Rule 0.35."}],"title":"File::Find::Rule through 0.34 for Perl is vulnerable to Arbitrary Code Execution when `grep()` encounters a crafted file name","x_generator":{"engine":"Vulnogram 0.2.0"}},"adp":[{"references":[{"url":"https://github.com/richardc/perl-file-find-rule/pull/4","tags":["exploit"]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":8.8,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"REQUIRED","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2025-06-05T13:22:25.420367Z","id":"CVE-2011-10007","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2025-06-05T14:06:56.992Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/06/msg00006.html"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/05/4"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/06/1"},{"url":"http://www.openwall.com/lists/oss-security/2025/06/06/3"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-06-06T03:23:36.825Z"}}]}}