CVE-2024-45389 (GCVE-0-2024-45389)
Vulnerability from cvelistv5 – Published: 2024-09-03 19:30 – Updated: 2024-09-03 20:03
VLAI?
Title
Pagefind DOM clobbering could escalate to Cross-site Scripting (XSS)
Summary
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.
Severity ?
6.4 (Medium)
CWE
- CWE-79 - Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Assigner
References
| URL | Tags | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||
Impacted products
| Vendor | Product | Version | ||
|---|---|---|---|---|
| CloudCannon | pagefind |
Affected:
< 1.1.1
|
{
"containers": {
"adp": [
{
"affected": [
{
"cpes": [
"cpe:2.3:a:cloudcannon:pagefind:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unknown",
"product": "pagefind",
"vendor": "cloudcannon",
"versions": [
{
"lessThan": "1.1.1",
"status": "affected",
"version": "0",
"versionType": "custom"
}
]
}
],
"metrics": [
{
"other": {
"content": {
"id": "CVE-2024-45389",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-09-03T20:02:11.016566Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2024-09-03T20:03:17.823Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "pagefind",
"vendor": "CloudCannon",
"versions": [
{
"status": "affected",
"version": "\u003c 1.1.1"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "HIGH",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 6.4,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-79",
"description": "CWE-79: Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2024-09-03T19:30:15.699Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx"
},
{
"name": "https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986"
},
{
"name": "https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb"
}
],
"source": {
"advisory": "GHSA-gprj-6m2f-j9hx",
"discovery": "UNKNOWN"
},
"title": "Pagefind DOM clobbering could escalate to Cross-site Scripting (XSS)"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2024-45389",
"datePublished": "2024-09-03T19:30:15.699Z",
"dateReserved": "2024-08-28T20:21:32.801Z",
"dateUpdated": "2024-09-03T20:03:17.823Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"epss": {
"cve": "CVE-2024-45389",
"date": "2026-05-05",
"epss": "0.01215",
"percentile": "0.79108"
},
"nvd": "{\"cve\":{\"id\":\"CVE-2024-45389\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2024-09-03T20:15:08.217\",\"lastModified\":\"2025-10-14T14:44:29.873\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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.\"},{\"lang\":\"es\",\"value\":\"Pagefind, una librer\u00eda de b\u00fasqueda completamente est\u00e1tica, inicializa sus archivos din\u00e1micos de JavaScript y WebAssembly en relaci\u00f3n con la ubicaci\u00f3n del primer script que carga el usuario. Esta informaci\u00f3n se obtiene buscando el valor de `document.currentScript.src`. Antes de la versi\u00f3n 1.1.1 de Pagefind, era posible \\\"bloquear\\\" esta b\u00fasqueda con HTML benigno en la p\u00e1gina. Esto har\u00e1 que `document.currentScript.src` se resuelva como un dominio externo, que luego ser\u00e1 utilizado por Pagefind para cargar dependencias. Esta vulnerabilidad solo funcionar\u00eda en el caso de que un atacante pudiera inyectar HTML en un sitio web alojado y en vivo. En estos casos, esto actuar\u00eda como una forma de escalar el privilegio disponible para un atacante. Esto supone que tienen la capacidad de agregar algunos elementos a la p\u00e1gina (por ejemplo, etiquetas `img` con un atributo `name`), pero no otros, ya que agregar un `script` a la p\u00e1gina ser\u00eda en s\u00ed mismo el vector de cross-site scripting. Pagefind ha mejorado esta resoluci\u00f3n en la versi\u00f3n 1.1.1 al garantizar que la fuente se cargue desde un elemento de script v\u00e1lido. No hay informes de que esto se haya explotado en la pr\u00e1ctica a trav\u00e9s de Pagefind.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H\",\"baseScore\":6.4,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"LOW\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.6,\"impactScore\":4.7},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N\",\"baseScore\":5.4,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"REQUIRED\",\"scope\":\"CHANGED\",\"confidentialityImpact\":\"LOW\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"NONE\"},\"exploitabilityScore\":2.3,\"impactScore\":2.7}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-79\"}]},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-79\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:pagefind:pagefind:*:*:*:*:*:*:*:*\",\"versionEndExcluding\":\"1.1.1\",\"matchCriteriaId\":\"AF097D5A-E779-401F-917F-5B2AC7D99D83\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:pagefind:pagefind:1.1.1:alpha0:*:*:*:*:*:*\",\"matchCriteriaId\":\"857EE816-51C2-4142-A2FC-BCD3AB32BC4A\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:pagefind:pagefind:1.1.1:alpha1:*:*:*:*:*:*\",\"matchCriteriaId\":\"72BCFAC4-B085-4BFC-976C-CF70DCC1DD4C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:pagefind:pagefind:1.1.1:alpha2:*:*:*:*:*:*\",\"matchCriteriaId\":\"5AF10815-C5AB-40B1-BB5F-99E8B69AFFCC\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:pagefind:pagefind:1.1.1:alpha3:*:*:*:*:*:*\",\"matchCriteriaId\":\"471A8930-0B87-4DD1-A40B-373FE9A76D11\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:pagefind:pagefind:1.1.1:alpha4:*:*:*:*:*:*\",\"matchCriteriaId\":\"38314DD1-9F55-4E42-B569-89E81CF89B06\"}]}]}],\"references\":[{\"url\":\"https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Patch\"]},{\"url\":\"https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Vendor Advisory\"]},{\"url\":\"https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Not Applicable\"]}]}}",
"vulnrichment": {
"containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-45389\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"poc\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-03T20:02:11.016566Z\"}}}], \"affected\": [{\"cpes\": [\"cpe:2.3:a:cloudcannon:pagefind:*:*:*:*:*:*:*:*\"], \"vendor\": \"cloudcannon\", \"product\": \"pagefind\", \"versions\": [{\"status\": \"affected\", \"version\": \"0\", \"lessThan\": \"1.1.1\", \"versionType\": \"custom\"}], \"defaultStatus\": \"unknown\"}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-03T20:03:12.154Z\"}}], \"cna\": {\"title\": \"Pagefind DOM clobbering could escalate to Cross-site Scripting (XSS)\", \"source\": {\"advisory\": \"GHSA-gprj-6m2f-j9hx\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 6.4, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"MEDIUM\", \"vectorString\": \"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H\", \"integrityImpact\": \"LOW\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"HIGH\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"LOW\"}}], \"affected\": [{\"vendor\": \"CloudCannon\", \"product\": \"pagefind\", \"versions\": [{\"status\": \"affected\", \"version\": \"\u003c 1.1.1\"}]}], \"references\": [{\"url\": \"https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx\", \"name\": \"https://github.com/CloudCannon/pagefind/security/advisories/GHSA-gprj-6m2f-j9hx\", \"tags\": [\"x_refsource_CONFIRM\"]}, {\"url\": \"https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986\", \"name\": \"https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb\", \"name\": \"https://github.com/CloudCannon/pagefind/commit/14ec96864eabaf1d7d809d5da0186a8856261eeb\", \"tags\": [\"x_refsource_MISC\"]}], \"descriptions\": [{\"lang\": \"en\", \"value\": \"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.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-79\", \"description\": \"CWE-79: Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2024-09-03T19:30:15.699Z\"}}}",
"cveMetadata": "{\"cveId\": \"CVE-2024-45389\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-09-03T20:03:17.823Z\", \"dateReserved\": \"2024-08-28T20:21:32.801Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2024-09-03T19:30:15.699Z\", \"assignerShortName\": \"GitHub_M\"}",
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
}
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…