Your RSA-2048 keys break in 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 reference exists, 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
Sep 3, 2024
Updated
Aug 12, 2026
Affected
4 pkgs
Patched
4 / 4
Exploits
1 known
Exploitation data as of Sep 17, 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 CVEs36th percentile — riskier than 36% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2024-45389 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

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.

115other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
pagefindcrates.io
1.6Mdownloads / week
@pagefind/default-uinpm
977Kdownloads / 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
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

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2024-45389 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2024-45389. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

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?

O3 Security finds CVE-2024-45389 across crates.io, npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2024-45389: pagefind XSS (Medium 6.4) | O3 Security