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): upgrade various vulnerable packages #5573

Conversation

eventualbuddha
Copy link
Collaborator

@eventualbuddha eventualbuddha commented Oct 31, 2024

Upgrades various packages past known vulnerable versions:

None of these were clearly exploitable, but the risk of the upgrades should be low as they're mostly development dependencies. The one that we do use in the application is react-pdf, but I kept the upgrade as minimal as possible (7.7.0 → 7.7.3, current is 9.1.1).

We still have a number of known vulnerable dependencies with high, moderate, and low severity. None of the remaining high ones are clearly exploitable:

  • GHSA-p6mc-m468-83gwlodash.set and lodash.setWith: used in tests and with no user-generated property paths
  • GHSA-wgrm-67xf-hhpq – arbitrary code execution in pdfjs-dist for malicious PDFs: we only show PDFs we generate
  • GHSA-grv7-fg5c-xmjg – uncontrolled resource consumption in braces: this is a transitive dependency of lint-staged and stylelint, which take our code and paths as input
  • GHSA-3h5v-q93c-6h6q – crash in ws given too many headers: we don't use websockets, and we don't accept requests outside localhost
  • GHSA-c2qf-rxjj-qqgwsemver DoS, but not in the way it is transitively used in our codebase
  • GHSA-2p57-rm9w-gvfpip vulnerability, used via development-only @storybook/* packages
  • GHSA-qwcr-r2fm-qrc7body-parser vulnerability, used via development-only @storybook/* packages
  • GHSA-9wv6-86v2-598jpath-to-regexp vulnerability, used by fetch-mock in tests, react-router with fixed vendor-provided strings, and @storybook/cli in development

Fixes a vulnerability in `follow-redirects` by updating the package that depends on it, `http-proxy-middleware`.

GHSA-74fj-2j2h-c42q
Updates to `[email protected]` to mitigate GHSA-87hq-q4gp-9wr4.

```
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ react-pdf vulnerable to arbitrary JavaScript execution │
│                     │ upon opening a malicious PDF with PDF.js               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ react-pdf                                              │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ <7.7.3                                                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=7.7.3                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ apps/admin/frontend > [email protected]                  │
│                     │                                                        │
│                     │ apps/design/frontend > [email protected]                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ GHSA-87hq-q4gp-9wr4      │
└─────────────────────┴────────────────────────────────────────────────────────┘
```
Upgrades rollup to work around GHSA-gcx4-mw62-g8wm.

```
┌─────────────────────┬────────────────────────────────────────────────────────┐
│ high                │ DOM Clobbering Gadget found in rollup bundled scripts  │
│                     │ that leads to XSS                                      │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ rollup                                                 │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=3.0.0 <3.29.5                                        │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=3.29.5                                               │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ . > @storybook/[email protected] > [email protected]      │
│                     │                                                        │
│                     │ . > @storybook/[email protected] > [email protected] >       │
│                     │ [email protected]                                          │
│                     │                                                        │
│                     │ . > @storybook/[email protected] >                      │
│                     │ @joshwooding/[email protected] │
│                     │ > [email protected] > [email protected]                           │
│                     │                                                        │
│                     │ ... Found 17 paths, run `pnpm why rollup` for more     │
│                     │ information                                            │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ GHSA-gcx4-mw62-g8wm      │
└─────────────────────┴────────────────────────────────────────────────────────┘
```
@arsalansufi
Copy link
Contributor

Thank you for the detailed consideration here Brian! I agree with your assessments and think that these changes are sufficient for v4

I may end up merging this on your behalf before I make images today, FYI

@arsalansufi arsalansufi merged commit ad07804 into main Nov 1, 2024
62 checks passed
@arsalansufi arsalansufi deleted the 3826-audit-vxsuite--kiosk-browser-dependecies-and-upgradeprune-where-possible branch November 1, 2024 15: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.

Audit vxsuite & kiosk-browser dependecies and upgrade/prune where possible
3 participants