Vulnerabilites related to RCLAMP - File::Find::Rule
CVE-2011-10007 (GCVE-0-2011-10007)
Vulnerability from cvelistv5
Published
2025-06-05 11:57
Modified
2025-06-11 12:27
CWE
  • CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Summary
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)
Impacted products
Vendor Product Version
RCLAMP File::Find::Rule Version: 0   <
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "NETWORK",
              "availabilityImpact": "HIGH",
              "baseScore": 8.8,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "HIGH",
              "integrityImpact": "HIGH",
              "privilegesRequired": "NONE",
              "scope": "UNCHANGED",
              "userInteraction": "REQUIRED",
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2011-10007",
                "options": [
                  {
                    "Exploitation": "poc"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-06-05T13:22:25.420367Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-06-05T14:06:56.992Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "references": [
          {
            "tags": [
              "exploit"
            ],
            "url": "https://github.com/richardc/perl-file-find-rule/pull/4"
          }
        ],
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2025-06-06T03:23:36.825Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "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"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "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.\u003cbr\u003e\u003cbr\u003eA 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.\u003cbr\u003e\u003cbr\u003eExample:\u003cbr\u003e\u003cbr\u003e\u003ctt\u003e$ mkdir /tmp/poc; echo \u0026gt; \"/tmp/poc/|id\"\u003cbr\u003e$ perl -MFile::Find::Rule \\\u003cbr\u003e\u0026nbsp; \u0026nbsp; -E \u0027File::Find::Rule-\u0026gt;grep(\"foo\")-\u0026gt;in(\"/tmp/poc\")\u0027\u003cbr\u003euid=1000(user) gid=1000(user) groups=1000(user),100(users)\u003cbr\u003e\u003c/tt\u003e\u003cbr\u003e\u003cbr\u003e"
            }
          ],
          "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 \u003e \"/tmp/poc/|id\"\n$ perl -MFile::Find::Rule \\\n\u00a0 \u00a0 -E \u0027File::Find::Rule-\u003egrep(\"foo\")-\u003ein(\"/tmp/poc\")\u0027\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 (\u0027OS Command Injection\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-11T12:27:11.870Z",
        "orgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
        "shortName": "CPANSec"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
    "assignerShortName": "CPANSec",
    "cveId": "CVE-2011-10007",
    "datePublished": "2025-06-05T11:57:58.654Z",
    "dateReserved": "2025-06-05T01:05:46.861Z",
    "dateUpdated": "2025-06-11T12:27:11.870Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}