Skip to content

fix: bump @nestjs/swagger and force swagger-ui-dist >=5.19 to drop vulnerable DOMPurify - #658

Merged
mikhail-egorov merged 1 commit into
mainfrom
me-priv-224-bump-nestjsswagger-in-block-explorer-to-drop-vulnerable
Sep 1, 2026
Merged

fix: bump @nestjs/swagger and force swagger-ui-dist >=5.19 to drop vulnerable DOMPurify#658
mikhail-egorov merged 1 commit into
mainfrom
me-priv-224-bump-nestjsswagger-in-block-explorer-to-drop-vulnerable

Conversation

@mikhail-egorov

Copy link
Copy Markdown
Contributor

What ❔

Drops the vulnerable DOMPurify bundled inside the Swagger UI served by the API at /docs (PRIV-224):

  • packages/api: bump @nestjs/swagger ^7.0.0^8.1.1 — the latest line compatible with NestJS 10.
  • Root package.json: add an npm override forcing swagger-ui-dist to ^5.32.14 (8.1.1 alone would still pin 5.18.2, which carries DOMPurify 3.1.6).
  • package-lock.json: the resulting resolution — @nestjs/swagger@8.1.1, swagger-ui-dist@5.32.14, @nestjs/mapped-types@2.0.6, and new transitive @scarf/scarf@1.4.0.

The served swagger-ui-bundle.js now embeds DOMPurify 3.4.13 (patched in 3.2.4).

Why ❔

DOMPurify < 3.2.4 (CVE-2025-26791) inside the swagger-ui-bundle.js served by /docs. Not exploitable — the CVE requires DOMPurify's SAFE_FOR_TEMPLATES option, which Swagger UI never sets, and /docs is auth-gated in Prividium mode.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@mikhail-egorov
mikhail-egorov requested a review from a team as a code owner September 1, 2026 11:42
@wiz-fa2dcc4065

wiz-fa2dcc4065 Bot commented Sep 1, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 3 High 4 Medium
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 3 High 4 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

API E2E Test Results

185 tests   185 ✅  10s ⏱️
 13 suites    0 💤
  1 files      0 ❌

Results for commit c0a401c.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

API Prividium E2E Test Results

9 tests   9 ✅  3s ⏱️
1 suites  0 💤
1 files    0 ❌

Results for commit c0a401c.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Unit Test Results

    4 files    281 suites   8m 56s ⏱️
2 317 tests 2 316 ✅ 1 💤 0 ❌
2 484 runs  2 483 ✅ 1 💤 0 ❌

Results for commit c0a401c.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR:
https://staging-scan-v2-zksyncos--pr-658-ozg3c09k.web.app

@mikhail-egorov
mikhail-egorov merged commit 99627e1 into main Sep 1, 2026
24 of 26 checks passed
@mikhail-egorov
mikhail-egorov deleted the me-priv-224-bump-nestjsswagger-in-block-explorer-to-drop-vulnerable branch September 1, 2026 14:13
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.29.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants