6.4

CVE-2024-45389: cloudcannon pagefind Cross-site Scripting

CVSS: 6.4v3.1MediumAnalyzed
AliasesGHSA-gprj-6m2f-j9hx
Published 03-09-2024Last modified 03-09-2024

Vulnerability summary

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

Overall risk
26/100
0100
Medium · default modelHow is this calculated?
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 listedIn no KEV catalog
RansomwareNone recordedNo known 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

35%

Versus all other CVEs

30-day change

0.00 pp

From 0.42% on 20-09-2026

20-09-202620-10-2026
EPSS score
0.42%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

@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