Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency pagefind to v1.1.1 [security] #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 4, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pagefind 1.1.0 -> 1.1.1 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2024-45389

Pagefind initializes its dynamic JavaScript and WebAssembly files relative to the location of the first script you load. This information is gathered by looking up the value of document.currentScript.src.

It is possible to "clobber" this lookup with otherwise benign HTML on the page, for example:

<img name="currentScript" src="blob:https://xxx.xxx.xxx/ui.js"></img>

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 your 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 XSS vector.

Pagefind has tightened this resolution by ensuring the source is loaded from a valid script element. There are no reports of this being exploited in the wild via Pagefind.

Original Report

If an attacker can inject benign html, such as:
<img name="currentScript" src="blob:https://xxx.xxx.xxx/ui.js"></img>

they can clobber document.currentScript.src leading to XSS in your library.

Here is the same attack on webpack that was accepted: GHSA-4vvj-4cpr-p986


Release Notes

CloudCannon/pagefind (pagefind)

v1.1.1

Compare Source

Fixes & Tweaks
  • Fixes an issue where internal anchor and weight tokens would leak when captured in meta or filter attributes.
  • Improves segmentation for extended languages (PR #​600 — thanks @​hamano !).
  • Improves Pagefind's processing of "index.html" URLs (PR #​604 — thanks @​dscho !).
  • Fixes some instances of incorrect types in the Pagefind NodeJS API (PRs #​642 & #​655 — thanks @​vanyauhalin & SKalt !).
UI Translations
  • Added Swahili translations
Secutiry
  • Fix potential DOM clobbering when initializing Pagefind

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/npm-pagefind-vulnerability branch from cebd857 to 404360b Compare October 10, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants