Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-45389

MEDIUM 6.4EPSS 48%

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

Also known as GHSA-gprj-6m2f-j9hx

Mitigation

  • Upgrade pagefind to 1.1.1 or later.
  • Upgrade @pagefind/default-ui to 1.1.1 or later.
  • Upgrade @pagefind/modular-ui to 1.1.1 or later.

Who should check

  • Projects that depend on npm package pagefind (< 1.1.1)
  • Projects that depend on npm package @pagefind/default-ui (< 1.1.1)
  • Projects that depend on npm package @pagefind/modular-ui (< 1.1.1)
  • Projects that depend on crates.io package pagefind (< 1.1.1)
  • Anyone running CloudCannon pagefind < 1.1.1

Vulnerability facts

Affected
pagefind < 1.1.1; @pagefind/default-ui < 1.1.1; @pagefind/modular-ui < 1.1.1; pagefind < 1.1.1
Fixed in
1.1.1
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, login needed
CVSS
6.4 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: High
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: Low
  • Integrity impact: Low
  • Availability impact: High
EPSS
0.69% chance of exploitation in 30 days (percentile 48, 2026-11-26)
CWE
CWE-79
Published
Modified

Description

Pagefind, a fully static search library, initializes its dynamic JavaScript and WebAssembly files relative to the location of the first script the user loads. This information is gathered by looking up the value of `document.currentScript.src`. Prior to Pagefind version 1.1.1, it is possible to "clobber" this lookup with otherwise benign HTML on the page. 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 a 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 cross-site scripting vector. Pagefind has tightened this resolution in version 1.1.1 by ensuring the source is loaded from a valid script element. There are no reports of this being exploited in the wild via Pagefind.

Affected and fixed versions

Package / productAffectedFixedSource
npm pagefind< 1.1.11.1.1osv
npm @pagefind/default-ui< 1.1.11.1.1osv
npm @pagefind/modular-ui< 1.1.11.1.1osv
crates.io pagefind< 1.1.11.1.1osv
CloudCannon pagefind< 1.1.1—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-45389. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-45389.md
Affected: pagefind < 1.1.1; @pagefind/default-ui < 1.1.1; @pagefind/modular-ui < 1.1.1; pagefind < 1.1.1
Fixed in: 1.1.1

Steps:
1. Search this machine and project for pagefind (npm), @pagefind/default-ui (npm), @pagefind/modular-ui (npm), pagefind (crates.io), CloudCannon pagefind: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-45389 being exploited?

There is no confirmed exploitation: CVE-2024-45389 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.69% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-45389?

Medium: CVSS 6.4 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2024-45389?

pagefind < 1.1.1; @pagefind/default-ui < 1.1.1; @pagefind/modular-ui < 1.1.1; pagefind < 1.1.1.

Is there a fix for CVE-2024-45389?

Yes. Fixed in 1.1.1. Upgrade pagefind to 1.1.1 or later. Upgrade @pagefind/default-ui to 1.1.1 or later. Upgrade @pagefind/modular-ui to 1.1.1 or later.

How do I check if I'm affected by CVE-2024-45389?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors