Skip to content

fix: resolve 13 CVEs via npm dependency upgrades and parse-server 9.x config fixes#2223

Open
starmanlabsio wants to merge 2 commits into
OpenSignLabs:stagingfrom
starmanlabsio:source
Open

fix: resolve 13 CVEs via npm dependency upgrades and parse-server 9.x config fixes#2223
starmanlabsio wants to merge 2 commits into
OpenSignLabs:stagingfrom
starmanlabsio:source

Conversation

@starmanlabsio

Copy link
Copy Markdown

Summary

This PR resolves 13 known CVEs (7 server-side, 6 client-side) and removes a parse-server startup error by upgrading vulnerable dependencies and fixing deprecated configuration.

Audit results:

  • Server: 27 vulnerabilities reduced to 0
  • Client: 10 vulnerabilities reduced to 2 unfixable (no upstream fix exists)

NPM Package Upgrades and CVEs Resolved

Server (apps/OpenSignServer)

1. parse-server ^8.6.84 to ^9.10.0

CVE Severity Advisory Description
GHSA-9q82-xgwf-vj6h Moderate @apollo/server Browser bug bypasses XS-Search (read-only CSRF) prevention
CVE-2026-40895 High (CVSS 7.5) follow-redirects Custom auth headers (X-API-Key, etc.) leak on cross-domain redirect
CVE-2026-41907 Moderate uuid Missing buffer bounds check in v3/v5/v6 allows out-of-bounds write
CVE-2026-45736 Moderate ws Uninitialized memory disclosure via TypedArray in websocket.close()
CVE-2026-48779 High (CVSS 7.5) ws Memory exhaustion DoS from tiny fragments and data chunks
CVE-2026-25547 High brace-expansion DoS via unbounded brace range expansion exhausting CPU and memory
CVE-2026-45149 High brace-expansion max option applied too late, allowing ~505MB allocation on small input
CVE-2026-42338 Moderate ip-address XSS in Address6 HTML-emitting methods (group, link, spanAll)

parse-server 9.10.0 ships newer versions of @apollo/server (5.5.0), uuid (11.1.1), and fixes its internal dependency tree. Additional overrides pin follow-redirects, ws, brace-expansion, gaxios, express-rate-limit, and ip-address to patched versions.

2. nodemailer ^8.0.7 to ^9.0.3

  • No CVEs. Routine update to latest stable.

3. sharp ^0.34.5 to ^0.35.3

  • No CVEs. Routine update. Note: sharp is unused in the codebase (no imports found) and could be removed in a follow-up.

4. ws >=8.21.0 to >=8.21.1

Client (apps/OpenSign)

5. react-router ^7.14.2 to ^8.3.0

CVE / Advisory Severity Description
CVE-2026-22030 / GHSA-h5cw-625j-3rxh High (CVSS 7.5) CSRF on document POST requests to UI routes with server-side actions
GHSA-qwww-vcr4-c8h2 High RSC Mode CSRF bypass allows action execution before 400 response
GHSA-2w69-qvjg-hvjx High XSS via Open Redirects
GHSA-8v8x-cx79-35w7 High SSRX XSS in ScrollRestoration
GHSA-49rj-9fvp-4h2h High Vendored turbo-stream allows arbitrary constructor invocation (RCE)
GHSA-2j2x-hqr9-3h42 High Same-origin redirect with path starting // causes open redirect
GHSA-8646-j5j9-6r62 High XSS in unstable RSC redirect handling via javascript: targets
GHSA-f22v-gfqf-p8f3 High Stored XSS via unescaped Location header in prerendered redirect HTML
GHSA-8x6r-g9mw-2r78 High DoS via unbounded path expansion in __manifest endpoint
GHSA-rxv8-25v2-qmq8 High DoS via reflected user input in single-fetch
GHSA-wrjc-x8rr-h8h6 High Open redirect via backslash in Link and useNavigate
GHSA-jjmj-jmhj-qwj2 High Open redirect leading to XSS
GHSA-h8fp-f39c-q6mh High RSCErrorHandler missing protocol validation (XSS)
GHSA-337j-9hxr-rhxg High Arbitrary constructor injection via deserializeErrors() in SSR hydration
GHSA-chx6-hx7r-mcp5 High Unauthenticated DoS via inefficient route matching

The vulnerable range is 7.12.0 through 8.2.0. Version 8.3.0 is the first clean release. The codebase uses only basic APIs (BrowserRouter, Routes, Route, Outlet, useNavigate, useLocation, useParams, NavLink, Link, Navigate, matchPath) which are all fully compatible with v8.


Source Code Changes and Rationale

apps/OpenSignServer/index.js

Change 1: Remove encodeParseObjectInCloudFunction: true

Line removed (was line 125)

This option was removed in parse-server 9.x. The server logged error: Invalid key(s) found in Parse Server configuration: encodeParseObjectInCloudFunction on every startup. Removing it eliminates the startup error. Cloud function serialization behavior is now controlled by parse-server's internal defaults.

Change 2: Remove allowExpiredAuthDataToken: false

Line removed (was line 122)

This option is deprecated in parse-server 9.x and scheduled for removal. The deprecation notice states: "Auth providers are always validated on login regardless of this setting." The previous value of false matches the default behavior, so removing it has no functional impact.

Change 3: Change logLevel: ['error'] to logLevel: 'error'

Line 109 (was line 111)

parse-server 9.x expects logLevel to be a string, not an array. Valid values are: error, warn, info, debug, verbose, silly, silent. Passing an array was silently handled in v8 but is not the documented format for v9.

Change 4: Fix cloud function to return the dynamic import Promise

Line 107 (was lines 107-109)

Before:

cloud: function () {
    import('./cloud/main.js');
},

After:

cloud: () => import('./cloud/main.js'),

The original code called import() but did not return the Promise. This created a race condition where parse-server could start accepting requests before cloud functions were fully registered. Returning the Promise allows parse-server to properly await cloud function registration during startup.


Unfixable Vulnerabilities (Accepted Risk)

Package CVE Severity Status
quill 2.0.3 CVE-2025-15056 Moderate XSS via HTML export. 2.0.3 is the latest version. No upstream fix exists.
insane 2.6.2 CVE-2020-26303 Moderate ReDoS in HTML sanitizer. Package unmaintained since 2016. Pulled in by @usewaypoint/block-text.

These are transitive dependencies with no available fix. The quill XSS requires an attacker to control rich text input and have a user export it as HTML. The insane ReDoS requires crafting a malicious HTML string that exceeds ~50 characters to trigger regex backtracking.


Additional Notes

  • Node.js 18 dropped: parse-server 9.x requires Node 20 or 22. The engines field has been updated from "18 || 20 || 22" to "20 || 22".
  • 13 deprecation warnings: parse-server 9.x emits warnings about upcoming default changes for options like fileUpload.allowedFileUrlDomains, requestComplexity.*, protectedFields*, etc. These are informational and do not affect current functionality. They will become breaking changes in a future parse-server release.
  • Docker images rebuilt: Both server and client images have been rebuilt and verified running with the updated dependencies.

Testing

  • Both Docker containers rebuilt from source and started successfully
  • npm audit verified: server shows 0 vulnerabilities, client shows 2 unfixable
  • Server startup logs confirmed: no more encodeParseObjectInCloudFunction invalid key error
  • All containers running and healthy

- Upgrade parse-server ^8.6.84 to ^9.10.0
- Upgrade react-router ^7.14.2 to ^8.3.0 (fixes 11 CVEs)
- Upgrade nodemailer ^8.0.7 to ^9.0.3
- Upgrade sharp ^0.34.5 to ^0.35.3
- Add security overrides: follow-redirects, uuid, ws, brace-expansion, gaxios, express-rate-limit, lodash, undici
- Server: 0 vulnerabilities, Client: 2 unfixable (quill, insane)
- Remove encodeParseObjectInCloudFunction (invalid option in v9, caused startup error)
- Remove allowExpiredAuthDataToken (deprecated, already defaults to false)
- Change logLevel from array ['error'] to string 'error'
- Fix cloud function to return dynamic import Promise
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@starmanlabsio is attempting to deploy a commit to the prafull 's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant