{"schemaVersion":4,"id":"CVE-2024-45389","aliases":["GHSA-gprj-6m2f-j9hx"],"status":"published","duplicateOf":null,"title":"Pagefind DOM clobbering could escalate to Cross-site Scripting (XSS)","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.","dates":{"published":"2024-09-03T19:30:15.699Z","modified":"2024-09-03T20:03:17.823Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.4,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":6.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Npm","score":6.1,"severity":"medium","vector":"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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":6.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","exploitability":4.1,"impact":7.8,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Crates.io","score":6.1,"severity":"medium","vector":"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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Crates.io","score":6.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","exploitability":4.1,"impact":7.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.4,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00421,"percentile":0.38372,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.00421},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00421,"percentile":0.38372}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00689,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00421,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00421,"percentile":0.38372}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"Crates.Io","product":"pagefind","name":"pagefind","label":"pagefind","ecosystem":"Crates.Io","cpePart":null,"purl":"pkg:cargo/pagefind","purlType":"cargo","versions":[{"text":"< 1.1.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"1.1.1","endInclusive":false}}],"versionsText":"< 1.1.1","eol":null,"hubHref":null},{"vendor":"cloudcannon","product":"pagefind","name":"pagefind","label":"pagefind","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.1.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"1.1.1","endInclusive":false}}],"versionsText":"< 1.1.1","eol":null,"hubHref":"/vendor/cloudcannon/pagefind"},{"vendor":"Npm","product":"pagefind","name":"pagefind","label":"pagefind","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/pagefind","purlType":"npm","versions":[{"text":"< 1.1.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"1.1.1","endInclusive":false}}],"versionsText":"< 1.1.1","eol":null,"hubHref":null},{"vendor":"@pagefind","product":"default-ui","name":"@pagefind/default-ui","label":"default-ui","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/@pagefind/default-ui","purlType":"npm","versions":[{"text":"< 1.1.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"1.1.1","endInclusive":false}}],"versionsText":"< 1.1.1","eol":null,"hubHref":null},{"vendor":"@pagefind","product":"modular-ui","name":"@pagefind/modular-ui","label":"modular-ui","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/@pagefind/modular-ui","purlType":"npm","versions":[{"text":"< 1.1.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"1.1.1","endInclusive":false}}],"versionsText":"< 1.1.1","eol":null,"hubHref":null},{"vendor":"pagefind","product":"pagefind","name":"pagefind","label":"pagefind","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.1.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"1.1.1","endInclusive":false}},{"text":"1.1.1:alpha0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"exact","version":"1.1.1:alpha0"}},{"text":"1.1.1:alpha1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"exact","version":"1.1.1:alpha1"}},{"text":"1.1.1:alpha2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"exact","version":"1.1.1:alpha2"}},{"text":"1.1.1:alpha3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"exact","version":"1.1.1:alpha3"}},{"text":"1.1.1:alpha4","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"exact","version":"1.1.1:alpha4"}}],"versionsText":"< 1.1.1 | 1.1.1:alpha0 | 1.1.1:alpha1 | 1.1.1:alpha2 | 1.1.1:alpha3 | 1.1.1:alpha4","eol":null,"hubHref":"/vendor/pagefind/pagefind"}],"affectedCount":6,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx","label":"github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Vendor Advisory"]},{"url":"https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986","label":"github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986","hostname":"github.com","tags":["X Refsource MISC","WEB","Not Applicable"]},{"url":"https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb","label":"github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb","hostname":"github.com","tags":["X Refsource MISC","WEB","Patch"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-45389","label":"nvd.nist.gov/vuln/detail/CVE-2024-45389","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/CloudCannon/pagefind","label":"github.com/CloudCannon/pagefind","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CVE-2024-43788"]},"timeline":[{"kind":"published","date":"2024-09-03T19:30:15.699Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-09-03T20:03:17.823Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 6.4, network access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,0,64],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00421,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2024-09-03T20:03:17.823Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","version":"3.1","headline":true},{"type":"cvss","source":"osv_npm","date":"2024-09-03T20:03:17.823Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"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","version":"4.0"},{"type":"cvss","source":"osv_npm","date":"2024-09-03T20:03:17.823Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","version":"3.1"},{"type":"cvss","source":"osv_crates.io","date":"2024-09-03T20:03:17.823Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"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","version":"4.0"},{"type":"cvss","source":"osv_crates.io","date":"2024-09-03T20:03:17.823Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","version":"3.1"},{"type":"cvss","source":"nvd","date":"2024-09-03T20:03:17.823Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2024-09-03T20:02:11.016Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"poc"}],"epss":{"value":0.00421,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T07:02:00.704Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T07:02:01.187Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T07:02:01.389Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T07:01:05.155Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T07:01:59.185Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T07:01:58.234Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T07:41:58.165Z","stale":false,"partial":false}}