6.4

CVE-2024-45389: Pagefind DOM clobbering could escalate to Cross-site Scripting (XSS)

Analyzed
AliasesGHSA-gprj-6m2f-j9hx
Published 03-09-2024Last modified 03-09-2024

Vulnerability summary

CVE-2024-45389 is a medium (CVSS 6.4) vulnerability in cloudcannon pagefind. EPSS estimates a 0.42% chance of exploitation in the next 30 days, higher than 38.3% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 6.4, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
6.4/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.42%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 0 · Related 1

Timeline

  1. 03-09-2024
    PublishedVulnerability first disclosed.
  2. 03-09-2024
    Last modifiedVulnerability information updated.

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.

CVSS metrics

6 scores · 4 sources · 2 versions

EPSS trend

Probability

0.42%

Chance of exploitation in the next 30 days

Percentile

38%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.42% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

@pagefind2 products
  • default-ui< 1.1.1
  • modular-ui< 1.1.1
Cloudcannon1 product
Crates.Io1 product
  • pagefind< 1.1.1
Npm1 product
  • pagefind< 1.1.1
Pagefind1 product
  • pagefind< 1.1.1 | 1.1.1:alpha0 | 1.1.1:alpha1 | 1.1.1:alpha2 | 1.1.1:alpha3 | 1.1.1:alpha4

5 vendors · 6 products

References

5 links