{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:unjs:ipx:*:*:*:*:*:node.js:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "1.3.2"
              },
              {
                "introduced": "2.0.0"
              },
              {
                "fixed": "2.1.1"
              },
              {
                "introduced": "3.0.0"
              },
              {
                "fixed": "3.1.1"
              }
            ],
            "source": [
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2785c3dfabc6fd4e3918c54fd88c93c6c1efbf88"
            },
            {
              "introduced": "3bddd8af0ae090cabf0ab3fd695833b702e5936f"
            },
            {
              "fixed": "36537bc1395854a57a34ab6aeecb5debfcb02ae1"
            },
            {
              "introduced": "b262ce0725355c766ce5d7d1f8593b093ef52af7"
            },
            {
              "fixed": "562ea7e44ebde1200d056f7f2ff900b36d5ec3c7"
            },
            {
              "fixed": "81693ddbfc062cc922e4e2406e8427ab4e3ad214"
            }
          ],
          "repo": "https://github.com/unjs/ipx",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-mm3p-j368-7jcr"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-22"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/54xxx/CVE-2025-54387.json"
  },
  "details": "IPX is an image optimizer powered by sharp and svgo. In versions 1.3.1 and below, 2.0.0-0 through 2.1.0, and 3.0.0 through 3.1.0, the approach used to check whether a path is within allowed directories is vulnerable to path prefix bypass when the allowed directories do not end with a path separator. This occurs because the check relies on a raw string prefix comparison. This is fixed in versions 1.3.2, 2.1.1 and 3.1.1.",
  "id": "CVE-2025-54387",
  "modified": "2026-07-15T01:49:12.434188245Z",
  "published": "2025-08-05T00:10:26.442Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/unjs/ipx/releases/tag/v1.3.2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/unjs/ipx/releases/tag/v2.1.1"
    },
    {
      "type": "WEB",
      "url": "https://github.com/unjs/ipx/releases/tag/v3.1.1"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/54xxx/CVE-2025-54387.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/unjs/ipx/security/advisories/GHSA-mm3p-j368-7jcr"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-54387"
    },
    {
      "type": "FIX",
      "url": "https://github.com/unjs/ipx/commit/81693ddbfc062cc922e4e2406e8427ab4e3ad214"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "IPX is Vulnerable to Path Traversal via Prefix Matching Bypass"
}