Security [MEDIUM]: Dependency CVEs — upgrade dompurify, vite/esbuild, brace-expansion #58
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
pnpm auditreports 6 MODERATE CVEs (no HIGH/CRITICAL): (1) dompurify ≤ 3.3.3 — ADD_TAGS/FORBID_TAGS bypass (production-runtime). (2) vite ≤ 6.4.1 — path-traversal in dev-deps (dev-only). (3) esbuild ≤ 0.24.2 — dev-server CORS*(dev-only). (4) brace-expansion 1.1.12 / 2.0.0-2.0.2 — ReDoS (transitive via eslint, exceljs, vitest).Evidence
pnpm audit --audit-level=high outputapps/web/package.json — direct dompurify dependencyImpact
Only dompurify is runtime. Stored XSS possible in project descriptions / estimate notes via sanitizer bypass.
Proposed Fix
(1) Upgrade
dompurifyto ≥ 3.3.4 (patch release). (2) Upgradevitest/vite/esbuildto latest. (3) Addoverridesin rootpackage.jsonpinningbrace-expansionto patched versions. (4) Integrate into CI as part of #28 (SAST/DAST).Acceptance Criteria
pnpm audit --audit-level=highreports 0 HIGH/CRITICAL and ≤2 moderateParent Epic: #1
Source: Full-Codebase Security Audit 2026-04-16 (C-8)
Acceptance criteria met.
pnpm audit --audit-level=moderateon main:Resolved upgrades (main commit
534945f):dompurify→ 3.3.4+ (runtime sanitizer bypass, GHSA-vhxf-7vqr-mrjg — patched).brace-expansionpinned to^5.0.5viapnpm.overridesin rootpackage.json— all transitive call-sites now inherit the patched version.esbuildpinned to>=0.25.0viapnpm.overrides.Remaining — single moderate CVE:
vite@5.4.21(transitive viavitest@2.1.9) — GHSA-4w7w-66w2-5vf9 (path-traversal invite devoptimized-deps.maphandling). Not exposed because vitest uses vite's transform pipeline only, never runs the dev server. Upgrading vite to >=6.4.2 requires vitest 3.x which is a breaking jump across the test suite (1900+ tests). Accepting the moderate as a documented dev-time risk; tracked for a future vitest-3 migration.Acceptance-criteria status:
pnpm audit --audit-level=highreports 0 HIGH/CRITICAL (verified)docs/security-architecture.mddep section — to be updated in the #28 PRClosing the core-dep part; CI-wiring tracked in #28.