Skip to content

chore(deps): fix security vulnerabilities in edge dependencies#13054

Merged
DeJeune merged 7 commits intomainfrom
fix-dependabot
Feb 26, 2026
Merged

chore(deps): fix security vulnerabilities in edge dependencies#13054
DeJeune merged 7 commits intomainfrom
fix-dependabot

Conversation

@Pleasurecruise
Copy link
Copy Markdown
Collaborator

  • fast-xml-parser: ^5.2.0 → ^5.3.5 (critical, entity encoding bypass)
  • tar: ^7.4.3 → ^7.5.9 (high, path traversal via hardlink)
  • diff: ^8.0.2 → ^8.0.3 (low, ReDoS in parsePatch/applyPatch)
  • markdown-it: ^14.1.0 → ^14.1.1 (moderate, ReDoS)
  • add pnpm overrides for [email protected] and [email protected] to patch transitive deps

- fast-xml-parser: ^5.2.0 → ^5.3.5 (critical, entity encoding bypass)
- tar: ^7.4.3 → ^7.5.9 (high, path traversal via hardlink)
- diff: ^8.0.2 → ^8.0.3 (low, ReDoS in parsePatch/applyPatch)
- markdown-it: ^14.1.0 → ^14.1.1 (moderate, ReDoS)
- add pnpm overrides for [email protected] and [email protected] to patch transitive deps

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings February 25, 2026 17:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates several dependencies to address security vulnerabilities in the edge build, including critical, high, moderate, and low severity issues. The changes upgrade fast-xml-parser, tar, diff, and markdown-it to their latest secure versions, and add pnpm overrides to ensure transitive dependencies are also patched.

Changes:

  • Updated fast-xml-parser to address a critical entity encoding bypass vulnerability
  • Updated tar to fix a high-severity path traversal vulnerability via hardlink
  • Updated diff and markdown-it to resolve ReDoS vulnerabilities

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
package.json Updated dependency version specifiers for fast-xml-parser, tar, diff, and markdown-it; added pnpm overrides for tar and fast-xml-parser
pnpm-lock.yaml Updated lock file with new dependency versions, removed deprecated/vulnerable versions, and updated transitive dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Pleasurecruise
Copy link
Copy Markdown
Collaborator Author

This CI failure is not caused by this PR. The prepare script runs prek install, which attempts to download a binary from GitHub Releases at install time. This has always been a latent issue in the CI setup — it only surfaced here because updating the dependency versions changed pnpm-lock.yaml, which invalidated the pnpm cache and forced a full pnpm install (including the prepare lifecycle script) instead of restoring from cache. Previous CI runs were unaffected simply because the lockfile hadn't changed and the cached node_modules was reused. The root fix would be to make the prepare script skip prek install when CI=true.

Copy link
Copy Markdown
Collaborator

@EurFelux EurFelux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also looking at these security issues. However, the solution is not as simple as upgrading specific dependencies. Using overrides carries risks. For example, the currently depended webdav 5.8.0 indirectly relies on fast-xml-parser 4.5.3, where there is a major version gap. Directly overriding may lead to runtime errors; further investigation is needed to determine if it is safe to override.

It is recommended to use pnpm why to recheck. Additionally, please follow the PR template.

@Pleasurecruise
Copy link
Copy Markdown
Collaborator Author

I rechecked the dependency graph with pnpm why and made follow-up changes to avoid unsafe major jumps:

  • Upgraded webdav from 5.8.0 to 5.9.0. It now resolves [email protected] directly, so we are no longer forcing webdav from [email protected] to 5.x via override.
  • Verified lockfile now contains only [email protected] (no 4.x remains).
  • Added bounded minimatch overrides to patched versions (3.1.5, 5.1.7, 9.0.6, 10.2.1) to address known advisories across transitive paths.
  • Replaced [email protected] with @e965/xlsx and updated the import usage accordingly.

These follow-up updates are included in commit f407da835.

@DeJeune
Copy link
Copy Markdown
Collaborator

DeJeune commented Feb 26, 2026

conflict

@EurFelux
Copy link
Copy Markdown
Collaborator

EurFelux commented Feb 26, 2026

I have removed the overrides for tar and fast-xml-parser. I upgraded the dependencies that rely on these packages: electron-builder, epub and @aws-bedrock/*. Now, all dependencies for tar and fast-xml-parser have been upgraded to secure versions, including both direct and indirect dependencies.

The patch for epub has been deleted. This patch was originally introduced in #3268 to resolve an issue where the zipfile dependency of the epub package was incompatible with newer versions of Node.js. However, the latest version of epub no longer uses zipfile, making this patch unnecessary. Reference: julien-c/epub#60

@EurFelux EurFelux requested a review from beyondkmp February 26, 2026 07:34
@DeJeune DeJeune merged commit ef27726 into main Feb 26, 2026
11 checks passed
@DeJeune DeJeune deleted the fix-dependabot branch February 26, 2026 09:52
@Pleasurecruise
Copy link
Copy Markdown
Collaborator Author

The issue with fast-xml-parser still persists… Either we need to add overrides, or modify @ here
https://github.com/CherryHQ/embed-js

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.

4 participants