Pagefind DOM clobbering could escalate to Cross-site Scripting (XSS)
Published Sep 3, 2024
6.1
MEDIUMCVSS 4.0
EPSS 0.42%
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 products
-
- Version < 1.1.1StatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CloudCannon | Pagefind | n/a |
|
-
- Version 0StatusaffectedConstraints<1.1.1
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Cloudcannon | Pagefind | n/a |
|
No Red Hat product state for this CVE.
pagefind
npm
Introduced 0 Fixed 1.1.1@pagefind/default-ui
npm
Introduced 0 Fixed 1.1.1@pagefind/modular-ui
npm
Introduced 0 Fixed 1.1.1pagefind
crates.io
Introduced 0 Fixed 1.1.1
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | pagefind | 0 | 1.1.1 |
| npm | @pagefind/default-ui | 0 | 1.1.1 |
| npm | @pagefind/modular-ui | 0 | 1.1.1 |
| crates.io | pagefind | 0 | 1.1.1 |
Remediation
No remediation recorded yet.
Metrics
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
1 other source (GHSA) ▾
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
CISA SSVC (Vulnrichment)
Stakeholder-Specific Vulnerability Categorization from CISA ADP.
Exploitation
PoCAutomatable
NoTechnical Impact
PartialDecision
n/aAssessed Sep 3, 2024 · SSVC 2.0.3
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2024–2026- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (6 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 0.42% (0.00421) | 34.11th | v5 (v2026.06.15) |
| Jun 15, 2026 | 0.40% (0.00397) | 31.25th | v5 (v2026.06.15) |
| Oct 13, 2025 | 1.17% (0.01169) | 77.88th | v4 (v2025.03.14) |
| Mar 17, 2025 | 0.11% (0.00108) | 26.69th | v4 (v2025.03.14) |
| Dec 12, 2024 | 0.05% (0.00053) | 23.02th | v3 (v2023.03.01) |
| Sep 4, 2024 | 0.04% (0.00045) | 16.33th | v3 (v2023.03.01) |
References (5)
- https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb x_refsource_MISCPatch
- https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx x_refsource_CONFIRMVendor Advisory
- https://github.com/advisories/GHSA-gprj-6m2f-j9hx Advisory
- https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 x_refsource_MISCNot Applicable
- https://nvd.nist.gov/vuln/detail/CVE-2024-45389
| Link | Providers | Tags |
|---|---|---|
| https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb | x_refsource_MISCPatch | |
| https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx | x_refsource_CONFIRMVendor Advisory | |
| https://github.com/advisories/GHSA-gprj-6m2f-j9hx | Advisory | |
| https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 | x_refsource_MISCNot Applicable | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-45389 |
Change history (0)
No recorded changes yet.