Skip to content

fix(deps): resolve all open Dependabot alerts across next, sharp, js-yaml, nodemailer and csv-parse - #7659

Merged
waleedlatif1 merged 6 commits into
stagingfrom
fix/dependabot-2026-09
Sep 9, 2026
Merged

fix(deps): resolve all open Dependabot alerts across next, sharp, js-yaml, nodemailer and csv-parse#7659
waleedlatif1 merged 6 commits into
stagingfrom
fix/dependabot-2026-09

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Resolve all 17 open Dependabot alerts across five packages
  • next 16.3.1 → 16.3.4 — two critical unauthenticated RCEs (GHSA-p293-qw3h-jr36 on Windows-hosted servers, GHSA-2xp9-vwfh-vxw4 in the Image Optimization API via AVIF). Both are fixed in 16.3.3, but 16.3.3 disables AVIF optimization outright and we request image/avif in next.config.ts; 16.3.4 re-enables it and otherwise carries only backported bug fixes
  • sharp 0.35.3 → 0.35.4 — libheif RCE (GHSA-rgj7-g3m4-5g8c) via libvips 8.18.6. Also collapses a duplicate install: Next depends on sharp ^0.35.3, so the old root pin left a second nested copy loading two libvips builds into one process
  • js-yaml 4.3.1 → 4.3.2 — maxTotalMergeKeys did not count empty mappings, so a small document could burn CPU without hitting the limit. Both YAML entry points parse user-supplied files with merge keys enabled. The advisory PoC took 13s before and is now refused in 6ms
  • nodemailer 9.0.1 → 9.1.1 — quadratic addressparser DoS plus three address/content handling bypasses
  • csv-parse 6.1.0 → 7.0.2 — prototype replacement reachable via a duplicated __proto__ header
  • Final commit dedupes js-yaml so no vulnerable 4.3.1 copy remains anywhere in the tree

Type of Change

  • Bug fix (security)

Notes on compatibility

Deliberately one package per commit so each can be reverted independently.

  • csv-parse crosses a major, but upstream states 7.0.0 "was published by mistake, there is no breaking changes." Diffed 6.1.0 against 7.0.2 over plain, padded, CRLF, quoted-comma, embedded-tab, unicode-whitespace, ragged, BOM, blank-line and embedded-newline inputs under the exact options we pass. Only difference: trim now strips non-ASCII whitespace such as U+00A0, matching JS trim(). Record structure and field splitting are byte-identical
  • nodemailer's new maxRecipients defaults to 100000 (a backstop, not a delivery policy), and the tightened resolveContent sandbox only governs attachments passed as a file path or URL — we pass content buffers
  • The js-yaml dedupe removes nine stale lockfile entries. Every one of those consumers asks for ^4.1.x, which 4.3.2 satisfies. Done this way rather than deleting the lockfile (which re-resolved 1130 unrelated lines) or a global override (which would force v4 onto the two v3 consumers)
  • No Dockerfile, workflow, Helm chart, or docs pin these versions. @types/nodemailer 8.0.1 is already the latest published

Testing

Tested manually. Locally verified per package: bun run lint, bun run check:audits (46/46), bun run type-check across all workspaces, production builds of apps/sim and apps/docs, and the full Vitest suite. Also confirmed sharp loads its native binary and round-trips an AVIF encode/decode on libvips 8.18.6, that ordinary YAML merge documents still parse, and that bun install --frozen-lockfile succeeds.

One pre-existing flake is unrelated to this PR: lib/copilot/chat/process-contents.test.ts times out at its 10s limit under shard contention. Reproduced identically on a pristine origin/staging checkout with the original dependency versions.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Resolves Dependabot alerts #223, #224, #226, #228, #235, #236, #238, #239.

- GHSA-p293-qw3h-jr36: unauthenticated RCE on Windows-hosted servers
- GHSA-2xp9-vwfh-vxw4: unauthenticated RCE in the Image Optimization API
  when AVIF files are used

Both are fixed in 16.3.3. This takes 16.3.4 instead because 16.3.3
disabled AVIF image optimization outright and 16.3.4 re-enables it;
apps/sim/next.config.ts requests 'image/avif', so 16.3.3 alone would
silently drop AVIF output. 16.3.4 otherwise carries only backported bug
fixes, so there is no breaking change between 16.3.1 and 16.3.4.

Verified: type-check, lint, all 46 audits, full test suite, and
production builds of both apps/sim and apps/docs.
Resolves Dependabot alerts #230 and #234 (GHSA-rgj7-g3m4-5g8c), which
cover two critical libheif vulnerabilities reachable when processing
untrusted image input. Fixed upstream in sharp 0.35.4, which ships
libvips 8.18.6.

0.35.4 is a patch release with no API changes. No source file imports
sharp directly; it backs the Next.js image optimizer, which is the same
code path as the AVIF advisory addressed in the previous commit.

This also collapses a duplicate install: Next 16.3.4 depends on
sharp ^0.35.3, so with the root pinned at 0.35.3 bun kept a second
nested copy at 0.35.4, loading two libvips builds into one process and
warning about duplicate GNotificationCenterDelegate classes. Both now
resolve to a single 0.35.4.

Verified: sharp loads its native binary and round-trips an AVIF encode
and decode on libvips 8.18.6, plus all 46 audits, the full app test
suite, and a production build.
Resolves Dependabot alerts #229 and #237 (GHSA-2883-xcg3-v3hh).
maxTotalMergeKeys did not count empty mappings, so a small document
could merge a large sequence of them repeatedly and burn CPU without
ever reaching the configured limit.

The path is reachable: both YAML entry points, lib/file-parsers and
lib/chunkers, call yaml.load with the default schema, which enables
merge keys, and both run on user-supplied files. Confirmed against the
advisory proof of concept, which took 13s on 4.3.1 and is now refused
in 6ms.

Not a breaking change for real documents. The fix charges one extra
budget unit per merge source against a default maxTotalMergeKeys of
10000, so only pathological documents newly fail; a 200-merge document
over a 20-key anchor spends 4200 units and still loads. Ordinary merge
and anchor resolution is unchanged.
Resolves Dependabot alerts #227, #231, #232 and #233.

- GHSA-8m3c-c648-2xjj: quadratic addressparser complexity, remote DoS
  via a crafted address list
- GHSA-cc9r-2j5m-2m83: IDN/Punycode domain allow-list bypass
- GHSA-2x7j-588g-ccc2: RFC 5322 comment mis-parsing, both leading to
  delivery to an attacker-controlled domain
- GHSA-wmmp-3585-3rmp: resolveContent bypassed disableFileAccess and
  disableUrlAccess on the legacy signature

9.0.1 to 9.1.1 stays inside v9. Checked the two changes that could have
altered behavior:

- The new maxRecipients cap defaults to 100000 and is documented as a
  backstop, not a delivery policy, so no real send reaches it.
- The tightened resolveContent access sandbox only governs attachments
  given as a file path or URL. Sim passes attachment content as buffers
  in lib/messaging/email/providers, so the sandbox never applies.

Address parsing is unchanged for plain, display-name, quoted-comma,
multi-recipient, plus-tagged and unicode forms.

Verified: type-check, lint, all 46 audits, and the 130 tests covering
lib/messaging/email and lib/internal/smtp.
Resolves Dependabot alert #225 (GHSA-8cw4-87c7-c6xx). With columns and
group_columns_by_name enabled, a duplicated __proto__ header made the
duplicate-column branch assign through the __proto__ setter and replace
the parsed record's prototype with attacker-controlled data. 7.0.2 fixes
it with an Object.hasOwn duplicate check and Object.defineProperty.

Despite crossing a major, this is not a breaking upgrade: the
maintainers state that 7.0.0 "was published by mistake, there is no
breaking changes."

One real behavior change does land in the 6.1.0 to 7.0.2 range: trim now
aligns with ECMAScript whitespace, so a value padded with non-ASCII
whitespace such as U+00A0 is trimmed where it previously was not. Diffed
both versions over plain, padded, CRLF, quoted-comma, embedded-tab,
unicode-whitespace, ragged, BOM, blank-line and embedded-newline inputs
under the exact options Sim passes: the unicode-whitespace case is the
only difference, and it moves toward JavaScript trim semantics. Record
structure, headers and field splitting are byte-identical.

Sim never sets group_columns_by_name, so the vulnerable branch was not
reachable, but every CSV entry point does pass columns and trim on
user-supplied files.

Verified: type-check, lint, all 46 audits, and the 1946 tests across
lib/file-parsers, lib/table and lib/copilot/request/tools.
Pinning the two direct dependents to 4.3.2 left nine transitive
consumers pinned to their own nested 4.3.1, because bun does not
re-resolve a lockfile entry that still satisfies its range. The tree
therefore kept a vulnerable copy of the package the previous commit
was meant to remove.

Every one of those consumers asks for ^4.1.x, which 4.3.2 satisfies, so
the nesting was lockfile inertia rather than a real constraint. Dropping
the stale entries and reinstalling lets them all resolve to the single
hoisted 4.3.2. The two js-yaml 3.x consumers, artillery and gray-matter,
keep their own copy untouched.

Done this way rather than by deleting the lockfile, which re-resolves
every floating range and churned 1130 unrelated lines, or by a global
override, which would force v4 onto those two v3 consumers. This diff
removes nine lines and changes nothing else.

Verified: js-yaml 4.3.1 no longer resolves anywhere in the tree, the
docs site still builds its 700+ pages through fumadocs, and the desktop
suite covering electron-updater passes its 1600 tests.
@waleedlatif1
waleedlatif1 requested a review from a team as a code owner September 9, 2026 17:58
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 9, 2026 6:01pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The dependency updates appear safe to merge, with manifests, native packages, and lockfile resolutions remaining coherent.

Summary

  • Updates Next.js and its environment and SWC companion packages to 16.3.4.
  • Updates Sharp and its platform-specific libvips packages while deduplicating the installation used by Next.js.
  • Updates js-yaml, Nodemailer, and csv-parse, including lockfile deduplication of vulnerable js-yaml 4.3.1 copies.
  • Keeps workspace manifests, root overrides, and the Bun lockfile aligned.

@waleedlatif1
waleedlatif1 merged commit 9a10d35 into staging Sep 9, 2026
59 of 60 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/dependabot-2026-09 branch September 9, 2026 18:09
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