fix: patch vulnerable dependencies found in security audit by d4nnr · Pull Request #97 · Dapta-Tech/dapta-forms · GitHub
Skip to content

fix: patch vulnerable dependencies found in security audit - #97

Open
d4nnr wants to merge 1 commit into
Dapta-Tech:mainfrom
d4nnr:fix/vulnerable-dependencies-security-audit
Open

d4nnr wants to merge 1 commit into
Dapta-Tech:mainfrom
d4nnr:fix/vulnerable-dependencies-security-audit

Conversation

@d4nnr

@d4nnr d4nnr commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Ran pnpm audit --prod against the dependency tree as part of an informal security review. It flagged 35 advisories (16 high, 17 moderate, 2 low) across direct and transitive dependencies. This PR patches all but one.

None of these had a working exploit path in the current codebase — I checked each one against actual usage before bumping, rather than bumping blind. Details per package below. The point of the PR is preventive: closing vectors that a future, unrelated change could reopen.

Changes

  • drizzle-orm 0.38.2 → 0.45.2 — closes GHSA-gpj5-g38j-94v9, a SQL injection via sql.identifier() / .as(). Grepped the codebase: neither is called anywhere, so this wasn't reachable today — patched preventively.
  • **nodemailer 6.9.16 → 9.0.5** — closes several advisories, the highest-severity being a bypass where the rawsendMail option ignoresdisableFileAccess/disableUrlAccess. packages/notifications/src/adapters/smtp.tsonly sets standard message fields, neverraw. @types/nodemailerbumped to^8.0.1(the newest published; nodemailer 9.x ships no bundled types yet) —build:packages` compiles clean against it.
  • next 16.2.10 → 16.2.11 — closes four moderate advisories: DoS via invalid UTF-8 request bodies, unbounded Server Action payload size, SVG image-optimization DoS, and disclosure of an internal Server Function endpoint.
  • Transitive pins added via pnpm-workspace.yaml overrides (the direct dependency — @nestjs/platform-express or next — hasn't bumped its own range yet, each entry cites the advisory it closes): multer >=2.2.0, body-parser >=1.20.6, postcss >=8.5.23, file-type >=21.3.2, qs >=6.15.2. Mostly DoS-class issues in request/body parsing and file-type sniffing.
  • Moved onlyBuiltDependencies from root package.json to pnpm-workspace.yaml (pnpm 10.x deprecated reading it from package.json — was throwing a warning on every install, unrelated to the CVEs but fixed while touching this file).

Deliberately out of scope

@nestjs/core (GHSA-36xv-jgw5-4q75, needs >=11.1.18) is still open. Fixing it means a NestJS v10 → v11 major upgrade, which is a different, higher-risk change than a dependency patch bump. Left it as the one remaining pnpm audit --prod finding rather than bundling a framework major into this PR — happy to open that as a separate PR if useful.

Testing

  • pnpm run build:packages — 7/7 packages, clean
  • pnpm run typecheck — 16/16 turbo tasks, clean
  • pnpm run test — 979 tests (188 db + 431 web + 360 api), all green
  • pnpm audit --prod — 35 findings → 1 (the documented @nestjs/core exclusion above)

🤖 Generated with Claude Code

pnpm audit --prod flagged 35 advisories (16 high, 17 moderate, 2 low).
None had a working exploit path in current code (verified per-case in
the changeset), but several close real vectors:

- drizzle-orm 0.38.2 -> 0.45.2 (GHSA-gpj5-g38j-94v9, SQLi via
  sql.identifier()/.as() — confirmed unused in this codebase)
- nodemailer 6.9.16 -> 9.0.5 (high-severity raw-option bypass of
  disableFileAccess/disableUrlAccess — confirmed smtp adapter never
  sets `raw`); @types/nodemailer -> ^8.0.1 (newest published)
- next 16.2.10 -> 16.2.11 (4 moderate: UTF-8 DoS, unbounded Server
  Action payload, SVG DoS, internal endpoint disclosure)
- pnpm-workspace.yaml overrides for transitive pins: multer, body-parser,
  postcss, file-type, qs

Deliberately excluded: @nestjs/core (GHSA-36xv-jgw5-4q75) needs a
v10->v11 major bump, out of scope here — tracked separately. Audit
goes from 35 findings to that one documented exception.

build:packages, typecheck, and test (979 tests, 16/16 turbo tasks)
all pass unchanged.
@d4nnr
d4nnr requested a review from feggome1 as a code owner August 14, 2026 07:27
@josue-commits

Copy link
Copy Markdown
Contributor

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.

2 participants