CVE-2024-45389
JavaScript vulnerability analysis and mitigation

Overview

Pagefind, a fully static search library, contains a vulnerability (CVE-2024-45389) discovered in versions prior to 1.1.1. The vulnerability relates to how Pagefind initializes its dynamic JavaScript and WebAssembly files relative to the location of the first script the user loads, using document.currentScript.src. This vulnerability was disclosed on September 3, 2024, affecting all versions of Pagefind up to (excluding) version 1.1.1 (Vendor Advisory).

Technical details

The vulnerability stems from the way Pagefind handles script source location lookup through document.currentScript.src. Prior to version 1.1.1, it was possible to 'clobber' this lookup with benign HTML on the page, causing document.currentScript.src to resolve as an external domain. The vulnerability is classified as CWE-79 (Cross-site Scripting) with a CVSS v3.1 base score of 6.4 (Medium), indicating network attack vector, high attack complexity, low privileges required, and no user interaction needed (NVD).

Impact

If successfully exploited, this vulnerability could allow an attacker to escalate their privileges when they have the ability to inject HTML into a live, hosted website. While the attacker needs the capability to add certain elements to the page (such as img tags with a name attribute), they don't need the ability to add script tags, which would themselves constitute a cross-site scripting vector (Vendor Advisory).

Mitigation and workarounds

The vulnerability has been patched in Pagefind version 1.1.1. The fix involves ensuring that the source is loaded from a valid script element by adding safety checks around accesses for document.currentScript.src. Users should upgrade to version 1.1.1 or later to address this vulnerability (GitHub Patch).

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