CVE-2024-45389
Pagefind Remote Domain Hijacking Vulnerability
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.
INFO
Published Date :
Sept. 3, 2024, 8:15 p.m.
Last Modified :
Sept. 12, 2024, 8:17 p.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
4.7
Exploitability Score :
1.6
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-45389
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-45389
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-45389
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Sep. 12, 2024
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N Changed Reference Type https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb No Types Assigned https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb Patch Changed Reference Type https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx No Types Assigned https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx Vendor Advisory Changed Reference Type https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 No Types Assigned https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 Not Applicable Added CWE NIST CWE-79 Added CPE Configuration OR *cpe:2.3:a:cloudcannon:pagefinder:*:*:*:*:*:*:*:* versions up to (excluding) 1.1 -
CVE Received by [email protected]
Sep. 03, 2024
Action Type Old Value New Value Added 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. Added Reference GitHub, Inc. https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx [No types assigned] Added Reference GitHub, Inc. https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986 [No types assigned] Added Reference GitHub, Inc. https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb [No types assigned] Added CWE GitHub, Inc. CWE-79 Added CVSS V3.1 GitHub, Inc. AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-45389
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-45389
weaknesses.