CVE-2024-45389Pagefind DOM clobbering could escalate to Cross-site Scripting (XSS)
- 6.4MediumCVSS base score
- 0.42%Exploitation in 30 daysEPSS · top 63% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By GitHub_M
- 6 days later
· 6 days later
Published
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium6.4 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H |
| NVDNVD · Analyzed | 3.1 | Medium5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.42% · top 63% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.4.
Affected products
- affected < 1.1.1
Affected packages
Affected packages4
From reviewed advisories of the GitHub Advisory Database.
- crates.iopagefindGHSA-gprj-6m2f-j9hx (opens in a new tab)
- npm@pagefind/default-uiGHSA-gprj-6m2f-j9hx (opens in a new tab)
- npm@pagefind/modular-uiGHSA-gprj-6m2f-j9hx (opens in a new tab)
- npmpagefindGHSA-gprj-6m2f-j9hx (opens in a new tab)
References
References3
- https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx (opens in a new tab)x_refsource_CONFIRM
- https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 (opens in a new tab)x_refsource_MISC
- https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb (opens in a new tab)x_refsource_MISC
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-2804 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-gprj-6m2f-j9hx (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-45389)Record last updated .