Security: Update happy-dom and Vite to fix high-severity vulnerabilities (npm audit)

Open Beginner friendly
#622 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript, vite

Research direction

From the intercom-frontend directory, start by running npm audit and inspect the dependency changes produced by npm audit fix. Verify that happy-dom is at least 20.8.9 and that Vite uses a patched 7.x release, then run npm test, npm run typecheck, and npm run build. Done means the requested checks pass and the listed high-severity dependency vulnerabilities are remediated.

Written by the indexing model from the issue text.

Description

bug good first issue Medium ready-for-dev triaged

Summary

npm audit reveals 5 high-severity and 6 moderate vulnerabilities in the frontend dependency tree. Two of the high-severity issues are in happy-dom (used in tests) and three are in vite (build tool).

Affected Packages

Package Severity GHSA Description
happy-dom v20.7.0 HIGH (CVSS 7.5) GHSA-w4gp-fjgq-3q4g Fetch sends page-origin cookies to cross-origin targets
happy-dom v20.7.0 HIGH (CVSS 8.8) GHSA-6q6h-j7hj-3r64 ECMAScriptModuleCompiler arbitrary code execution
vite v7.3.1 HIGH GHSA-4w7w-66w2-5vf9 Path traversal in optimised deps
vite v7.3.1 HIGH GHSA-v2wj-q39q-566r fs.deny bypass
vite v7.3.1 HIGH GHSA-p9ff-h696-f583 Arbitrary file read via dev server
flatted (indirect) HIGH (CVSS 7.5) GHSA-25h7-pfq9-p65f Unbounded recursion DoS
minimatch (indirect) HIGH GHSA-3ppc-4f35-3m26 ReDoS via repeated wildcards

Steps to Remediate

cd intercom-frontend
npm audit fix
# Verify happy-dom >=20.8.9, vite >=7.x.x patched version
npm test
npm run typecheck
npm run build

Notes

  • happy-dom vulnerabilities affect test execution — a compromised test could potentially exfiltrate cookies or execute code during CI.
  • vite path traversal affects the dev server — ensure the dev server is never exposed on a public network interface.

Priority: HIGH

Dominant language
TypeScript
Stars
69
Forks
23
Avg merge
4d 5h
Merged PRs (30d)
16

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Eyevinn/intercom-frontend

All issues in Eyevinn/intercom-frontend

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.