CVE-2025-54387
JavaScript vulnerability analysis and mitigation

Overview

IPX, an image optimizer powered by sharp and svgo, has been identified with a path traversal vulnerability (CVE-2025-54387) discovered on August 4, 2025. The vulnerability affects versions 1.3.1 and below, 2.0.0-0 through 2.1.0, and 3.0.0 through 3.1.0. The issue stems from improper path validation when checking whether a path is within allowed directories, particularly when the allowed directories do not end with a path separator (GitHub Advisory).

Technical details

The vulnerability occurs due to the approach used to check whether a path is within allowed directories, which relies on a raw string prefix comparison. When the allowed directories do not end with a path separator, the check can be bypassed. This creates a path traversal vulnerability that could allow access to files outside the intended directory structure. The vulnerability has been assigned a CVSS v4.0 score of 6.9 (Medium) with the vector string 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 (GitHub Advisory).

Impact

The vulnerability could allow attackers to access files outside the intended directory structure through path traversal. For example, if a directory is set to './public', an attacker could potentially access files in '../public123/test.png' due to the prefix matching bypass. This could lead to unauthorized access to sensitive files outside the restricted directory (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in versions 1.3.2, 2.1.1, and 3.1.1. The fix involves ensuring that directory paths end with a path separator before performing the prefix comparison check. Users are strongly recommended to upgrade to these patched versions: >= v1.3.2 < 2.0.0 || >= v2.1.1 < 3.0.0 || >= v3.1.1 (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management