Skip to content

fix(deps): resolve all medium-severity Dependabot security alerts - #366

Merged
KIvanow merged 6 commits into
masterfrom
security/fix-medium-dependabot-alerts
Aug 7, 2026
Merged

fix(deps): resolve all medium-severity Dependabot security alerts#366
KIvanow merged 6 commits into
masterfrom
security/fix-medium-dependabot-alerts

Conversation

@KIvanow

@KIvanow KIvanow commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #364: fixes all open medium-severity Dependabot alerts that are fixable without breaking runtime consumers (12 of 13 alerts across 5 packages; the one exception is dismissed with justification, see below). Same approach as #364 — root pnpm.overrides, one commit per package, each verified by building the affected app(s) and running their test suites.

Vulnerabilities fixed:

  1. CVE-2026-69207hono < 4.12.34: ReDoS in CORS middleware via Access-Control-Request-Headers → 4.13.1
  2. CVE-2026-59896hono < 4.12.27: hono/jsx context not isolated per request (cross-request data disclosure) → 4.13.1
  3. CVE-2026-59895hono < 4.12.27: server-side XSS via JSX escaping bypass in cx() → 4.13.1
  4. CVE-2026-59897hono < 4.12.27: API Gateway v1 adapter drops distinct repeated request header values → 4.13.1
  5. CVE-2026-49978dompurify ≤ 3.4.6: IN_PLACE bypass via attached shadow root inside <template>.content → 3.4.13
  6. CVE-2026-49458dompurify ≤ 3.4.5: cross-realm IN_PLACE sanitization leaves executable markup → 3.4.13
  7. CVE-2026-49459dompurify ≤ 3.4.5: IN_PLACE preserves attributes of clobbered root element (XSS) → 3.4.13
  8. CVE-2026-65902dompurify < 3.4.7: hook mutation permanently pollutes default allowlists → 3.4.13
  9. CVE-2026-65898dompurify ≤ 3.4.10: permanent ALLOWED_ATTR pollution via setConfig() (incomplete-fix follow-up) → 3.4.13
  10. CVE-2026-59952valibot ≤ 1.4.1: record() issue paths make flatten() throw for inherited Object property names (DoS) → 1.4.2
  11. GHSA-frvp-7c67-39w9@hono/node-server < 2.0.5: path traversal in serve-static on Windows via encoded backslash → 2.1.0
  12. CVE-2026-54285@opentelemetry/core < 2.8.0: unbounded memory allocation in W3C Baggage propagation → 2.9.0 (also dedupes the orphaned 1.30.1/2.2.0/2.6.1 copies to one resolution)

Three dompurify low alerts (#253, #255, #256) close as a side effect of the 3.4.13 bump.

Intentionally not fixed — file-type ASF-parser infinite loop (CVE-2026-31808, alert #45): the vulnerable file-type@16.5.4 exists only inside ibm-cloud-sdk-core (pulled via @ibm-cloud/watsonx-ai@langchain/community), a code path this app never exercises. The patched 21.x line is ESM-only and verifiably breaks the SDK's CJS FileType.fromBuffer call (getContentType(Buffer) throws TypeError — reproduced locally before reverting). Alert dismissed as "vulnerable code is not actually used"; revisit if ibm-cloud-sdk-core updates its file-type dependency.

Changes

  • Raised/added pnpm.overrides in the root package.json: hono >=4.12.34, dompurify >=3.4.11, valibot >=1.4.2 <2, @hono/node-server >=2.0.5 <3, @opentelemetry/core >=2.8.0 <3
  • Regenerated pnpm-lock.yaml (per-package commits; each diff scoped to that package's chain)
  • Bumped packages/agent-memory devDependency @opentelemetry/sdk-trace-base ^1.30.1^2.9.0: the core 2.x override broke the 1.x SDK's getEnv() import, failing the span tests (caught by Bugbot). The tests already use the 2.x spanProcessors API, so no test changes were needed; this also removes the last @opentelemetry 1.x entries from the lockfile.

Verification (per commit + final sweep): pnpm install --frozen-lockfile passes; full workspace build (13 turbo tasks) green; apps/web suite fully green (45 files, 309 tests); apps/api suite green (~2,616 tests) except the known pre-existing environment-dependent failure (license.service.spec reads a real license key from the local env; fails identically on unmodified master). Note the @hono/node-server 1.x→2.x major: peer range stays hono ^4 and the MCP SDK consumer's suites pass unchanged. packages/agent-memory suite fully green after the sdk-trace-base bump (28 files, 207 tests).

Checklist

  • Unit / integration tests added — N/A, dependency version bumps only; existing suites pass
  • Docs added / updated — N/A
  • Roborev review passed — run roborev review --branch or /roborev-review-branch in Claude Code (internal)
  • Competitive analysis done / discussed (internal)
  • Blog post about it discussed (internal)

Note

Medium Risk
Medium risk from the @hono/node-server major bump and workspace-wide OTel 2.x consolidation; changes affect MCP SDK, Prisma dev tooling, and telemetry paths, though described as test-verified.

Overview
Raises minimum resolved versions through root pnpm.overrides and regenerates pnpm-lock.yaml to close multiple medium-severity Dependabot alerts—no application source changes.

Overrides added or tightened: hono (≥4.12.34), dompurify (≥3.4.11), valibot (≥1.4.2), @hono/node-server (≥2.0.5, major from 1.x), and @opentelemetry/core (≥2.8.0). The lockfile resolves hono 4.13.1, dompurify 3.4.13, @hono/node-server 2.1.0, valibot 1.4.2, and consolidates OpenTelemetry core / sdk-trace-base on 2.9.0 (dropping older 1.30.x / 2.2.x copies).

packages/agent-memory: devDependency @opentelemetry/sdk-trace-base moves from ^1.30.1 to ^2.9.0 so span tests align with the unified OTel stack pulled in via LangChain/langsmith and related packages.

Reviewed by Cursor Bugbot for commit 109f9d2. Bugbot is set up for automated code reviews on this repo. Configure here.

KIvanow added 5 commits August 7, 2026 13:02
hono <4.12.34 is vulnerable to ReDoS in the CORS middleware via
Access-Control-Request-Headers (CVE-2026-69207); <4.12.27 also has
cross-request jsx context disclosure (CVE-2026-59896), server-side
XSS via the cx() escaping bypass (CVE-2026-59895), and repeated
request header loss in the API Gateway v1 adapter (CVE-2026-59897).
Consumed via @modelcontextprotocol/sdk in apps/api. Resolves
4.12.25 -> 4.13.1.

Fixes Dependabot alerts #285, #286, #287, #312.
dompurify <=3.4.10 carries a set of medium-severity sanitization
flaws: IN_PLACE bypass via attached shadow root in <template>.content
(CVE-2026-49978), cross-realm IN_PLACE bypass (CVE-2026-49458),
clobbered-root attribute retention (CVE-2026-49459), permanent
default-allowlist pollution via hooks (CVE-2026-65902) and via
setConfig() (CVE-2026-65898). Consumed via posthog-js in apps/web.
Resolves 3.4.1 -> 3.4.13.

Fixes Dependabot alerts #250, #251, #252, #254, #259 (and low #253,
#255, #256).
valibot <=1.4.1 record() issue paths can make flatten() throw when
keys collide with inherited Object property names, enabling denial of
service on untrusted validation input (GHSA-5qjj-4xww-7phc). Consumed
via @prisma/dev in the api toolchain. Resolves 1.2.0 -> 1.4.2.

Fixes Dependabot alert #301.
@hono/node-server <2.0.5 serve-static allows path traversal on
Windows via encoded backslash (%5C) (GHSA-frvp-7c67-39w9). The
patched line is 2.x; it keeps the hono ^4 peer range and the MCP
SDK consumer passes its suite unchanged. Resolves 1.19.14 -> 2.1.0.

Fixes Dependabot alert #284.
@opentelemetry/core <2.8.0 allows unbounded memory allocation in W3C
Baggage propagation, a denial-of-service vector when processing
attacker-controlled baggage headers (GHSA-8988-4f7v-96qf). The
override dedupes the 1.30.1/2.2.0/2.6.1 copies to a single 2.9.0
resolution used across the telemetry stack.

Fixes Dependabot alert #258.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0ee08e8. Configure here.

Comment thread package.json
…e 2.x

The @opentelemetry/core >=2.8.0 security override left agent-memory's
dev-only sdk-trace-base@1.30.1 importing getEnv(), which core 2.x
removed, so MemoryStore.spans.test.ts failed to load. The spans test
already uses the 2.x constructor API (spanProcessors option), so
bumping the devDependency to ^2.9.0 fixes the suite without test
changes and removes the last @opentelemetry 1.x entries from the
lockfile.

All 28 agent-memory test files pass (207 tests).
@KIvanow
KIvanow merged commit 43d0fe2 into master Aug 7, 2026
3 checks passed
@KIvanow
KIvanow deleted the security/fix-medium-dependabot-alerts branch August 7, 2026 11:07
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant