NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🦀
🦀 crates.io📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2024-45389 — pagefind

MEDIUMFix: CloudCannon/pagefind@14ec968

CVE-2024-45389 is a medium-severity (CVSS 6.4) Cross-site Scripting (XSS) vulnerability in pagefind. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for pagefind — see the affected versions and patch details below.

Pagefind DOM clobbering could escalate to Cross-site Scripting (XSS)

Also known asGHSA-gprj-6m2f-j9hx
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
1 known
Exploitation data as of Nov 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2024-45389.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs37th percentile — riskier than 37% of all scored CVEsHighest risk
0.00%0.57%1.14%1.71%1.2%0.4%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

4 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

134other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
pagefindcrates.io
3.5Mdownloads / week
@pagefind/default-uinpm
2.2Mdownloads / week

Description

Pagefind initializes its dynamic JavaScript and WebAssembly files relative to the location of the first script you load. This information is gathered by looking up the value of document.currentScript.src.

It is possible to "clobber" this lookup with otherwise benign HTML on the page, for example:

<img name="currentScript" src="blob:https://xxx.xxx.xxx/ui.js"></img>

This will cause document.currentScript.src to resolve as an external domain, which will then be used by Pagefind to load dependencies.

This exploit would only work in the case that an attacker could inject HTML to your live, hosted, website. In these cases, this would act as a way to escalate the privilege available to an attacker. This assumes they have the ability to add some elements to the page (for example, img tags with a name attribute), but not others, as adding a script to the page would itself be the XSS vector.

Pagefind has tightened this resolution by ensuring the source is loaded from a valid script element. There are no reports of this being exploited in the wild via Pagefind.

Original Report

If an attacker can inject benign html, such as: <img name="currentScript" src="blob:https://xxx.xxx.xxx/ui.js"></img>

they can clobber document.currentScript.src leading to XSS in your library.

Here is the same attack on webpack that was accepted: https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iopagefindall versions1.1.1cargo update -p pagefind --precise 1.1.1
📦npmpagefindall versions1.1.1npm install pagefind@1.1.1
📦npm@pagefind/default-uiall versions1.1.1npm install @pagefind/default-ui@1.1.1
📦npm@pagefind/modular-uiall versions1.1.1npm install @pagefind/modular-ui@1.1.1

Affected Products

1 product · 6 configurations
Application
pagefindpagefind
< 1.1.1
1 version
1.1.1
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pagefind, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update pagefind to 1.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-45389 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Frequently Asked Questions

Pagefind initializes its dynamic JavaScript and WebAssembly files relative to the location of the first script you load. This information is gathered by looking up the value of `document.currentScript.src`. It is possible to "clobber" this lookup with otherwise benign HTML on the page, for example: ```html <img name="currentScript" src="blob:https://xxx.xxx.xxx/ui.js"></img> ``` This will cause `document.currentScript.src` to resolve as an external domain, which will then be used by Pagefind to load dependencies. This exploit would only work in the case that an attacker could inject HTML to
O3 Security · Impact-Aware SCA

Is CVE-2024-45389 in your dependencies?

Find it across crates.io, npm, including transitive dependencies.

CVE-2024-45389: pagefind XSS — Fixed in 1.1.1