Skip to content

chore(deps): bump deepmerge-ts and mariadb past audited vulnerabilities - #30189

Merged
aqrln merged 1 commit into
v7from
v7-audit-deepmerge-mariadb
Sep 1, 2026
Merged

aqrln merged 1 commit into
v7from
v7-audit-deepmerge-mariadb

Conversation

@tensordreams

@tensordreams tensordreams commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

pnpm audit --prod (the "Run pnpm audit (production dependencies only)" step of the Lint job) fails on every PR to this branch with four advisories:

  • deepmerge-ts < 8.0.0 — stack exhaustion on recursive object graphs (GHSA-ggr8-5vv4-36mx), high
  • mariadb >= 3.4.0 < 3.4.6 — cleartext password leak to a MitM despite ssl: true (GHSA-cqhc-2h57-wpxf, high), cleartext transmission of sensitive information (GHSA-42r5-vhpq-m858, moderate), and possible SQL injection in Buffer parameter escaping under multibyte client charsets (GHSA-g5xc-5w98-jfvm, moderate)

This PR bumps:

  • deepmerge-ts 7.1.5 → 8.0.2 in packages/config. The v8 breaking changes are Map deep-merging and a deepmergeInto mutation fix; @prisma/config uses neither — it only calls the basic deepmerge export on plain config objects (loadConfigFromFile.ts). v8 still ships dual CJS/ESM.
  • mariadb 3.4.5 → 3.5.3 in packages/adapter-mariadb. The advisories say "patched >= 3.4.6", but npm has no 3.4.6 — the 3.4.x line ends at 3.4.5; 3.5.3 is the current release satisfying the range.

Lockfile updated with the repo-pinned pnpm 11.13.1.

Testing performed

  • pnpm audit --prod against the updated lockfile: "No known vulnerabilities found".
  • pnpm --filter @prisma/config test: 4 files, 142 passed, 2 skipped — includes the config-merge tests that exercise deepmerge.
  • pnpm --filter @prisma/adapter-mariadb test: 45 passed.

Notes for the reviewer

Summary by CodeRabbit

  • Chores
    • Updated the MariaDB integration dependency to a newer version.
    • Updated the configuration merge dependency to a newer version.

pnpm audit --prod fails on every PR with four advisories:

- deepmerge-ts < 8.0.0: stack exhaustion on recursive object graphs
  (GHSA-ggr8-5vv4-36mx)
- mariadb >= 3.4.0 < 3.4.6: cleartext password leak to a MitM despite
  ssl: true (GHSA-cqhc-2h57-wpxf), cleartext transmission of sensitive
  information (GHSA-42r5-vhpq-m858), and possible SQL injection under
  multibyte client charsets (GHSA-g5xc-5w98-jfvm)

Bump deepmerge-ts 7.1.5 -> 8.0.2 and mariadb 3.4.5 -> 3.5.3. The
mariadb 3.4.x line has no 3.4.6 release on npm; 3.5.3 is the current
release that satisfies >= 3.4.6.

deepmerge-ts 8 changes Map merging and deepmergeInto mutation. Neither
matters here: @prisma/config only calls the basic deepmerge export on
plain config objects.

Signed-off-by: Oleksii Orlenko <robot@aqrln.net>
@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Team

Run ID: c9a7ed49-c1dd-4047-88bf-1a03c4e546f4

📥 Commits

Reviewing files that changed from the base of the PR and between 9028ed8 and a69c38f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • packages/adapter-mariadb/package.json
  • packages/config/package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Two package manifests update the mariadb and deepmerge-ts dependency versions. No public declarations change.

Changes

Dependency updates

Layer / File(s) Summary
Update package dependencies
packages/adapter-mariadb/package.json, packages/config/package.json
Updates mariadb from 3.4.5 to 3.5.3 and deepmerge-ts from 7.1.5 to 8.0.2.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to a69c3

This PR updates two vulnerable dependencies and the lockfile without any supplied merge-blocking concerns; no actionable risk remains beyond normal checks and review.

Suggested reviewers: aqrln, stevenmcclankerton

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the dependency updates and their purpose: resolving audited vulnerabilities in deepmerge-ts and mariadb.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v7-audit-deepmerge-mariadb

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
packages/client/runtime/index-browser.js 2.29 KB (0%)
packages/client/runtime/index-browser.d.ts 3.37 KB (0%)
packages/cli/build/index.js 110 B (0%)
packages/client/prisma-client-0.0.0.tgz 25.59 MB (+0.01% 🔺)
packages/cli/prisma-0.0.0.tgz 13.52 MB (0%)
packages/bundle-size/da-workers-libsql/output.tgz 1.28 MB (0%)
packages/bundle-size/da-workers-neon/output.tgz 1.35 MB (0%)
packages/bundle-size/da-workers-pg/output.tgz 1.34 MB (0%)
packages/bundle-size/da-workers-planetscale/output.tgz 1.28 MB (0%)
packages/bundle-size/da-workers-d1/output.tgz 1.26 MB (0%)

@aqrln
aqrln merged commit 93118fd into v7 Sep 1, 2026
499 of 502 checks passed
@aqrln
aqrln deleted the v7-audit-deepmerge-mariadb branch September 1, 2026 10:00
azumag added a commit to azumag/JSMKC that referenced this pull request Sep 13, 2026
Record prisma/orm#30189 as advisory historical evidence alongside the tracking issue while preserving the existing #3114 remediation policy.
GiHoon1123 pushed a commit to GiHoon1123/prisma that referenced this pull request Sep 19, 2026
…risma#30314)

## Summary

`npm audit` on `prisma@7.10.0` reports high-severity findings in
dependencies that Prisma pins (prisma#30295). The `deepmerge-ts` finding is
already fixed on this branch by prisma#30189 but is unreleased. This PR fixes
the rest:

- **`mysql2` 3.15.3 → 3.24.4** in `packages/cli`. Prisma Studio's MySQL
connection is its only consumer.
-
[GHSA-3f6p-5ww8-9rcr](GHSA-3f6p-5ww8-9rcr)
(high): a server can downgrade authentication to `mysql_clear_password`
and read the password in plaintext. Fixed in 3.22.0.
-
[GHSA-rgwj-5xj2-c3m3](GHSA-rgwj-5xj2-c3m3)
(moderate): unbounded zlib inflate in the compressed protocol handler.
Fixed in 3.23.1.
- **`fast-uri` override floor 3.1.5 → 3.1.6** in `pnpm-workspace.yaml`.
Four `fast-uri` advisories reach the lockfile through `@prisma/dev` →
`@prisma/streams-local` → `ajv`, and they fail the `pnpm audit --prod`
step on every PR to `v7`. Users are not affected, because a fresh
install already resolves `fast-uri` to 3.1.8.

The lockfile diff is limited to `mysql2`, its dependencies, and
`fast-uri`.

## Behavior changes for Studio users

- **Cleartext authentication is off by default.** `mysql2` 3.22.0 stops
accepting a server's request for `mysql_clear_password`. That is the fix
for the high-severity advisory. Servers that require it, such as AWS RDS
IAM authentication, now need `?enableCleartextPlugin=true` on the URL.
`normalizeMySQLConnectionString` keeps that parameter, and `mysql2`
parses it to `true`.
- **`@types/node` becomes a peer dependency of `prisma`'s dependency
tree.** Starting with 3.18.0, `mysql2` declares `@types/node: ">= 8"` as
a required peer dependency, and no fixed version drops it. npm 7+ and
pnpm install required peers automatically, so projects without
`@types/node` will get it after upgrading. It is types only. If that is
unwanted, the alternative is to move `mysql2` to `devDependencies` so
the CLI build bundles it, which is a larger change to the bundle.

## Testing performed

- `pnpm audit --prod`: before, 6 findings (2 `mysql2`, 4 `fast-uri`).
After, "No known vulnerabilities found".
- `vitest run src/__tests__/Studio.vitest.ts` in `packages/cli`: 31
passed. These tests mock `mysql2`, so they don't exercise the new
version.
- `pnpm run tsc` in `packages/cli`: passes.
- Manual check against MySQL 9.0 in Docker. I built the CLI, ran `prisma
studio --url "mysql://…?connection_limit=2"`, and confirmed from
`packages/cli` that `mysql2` resolves to 3.24.4. I then posted to
Studio's `/bff` endpoint:
- a plain `SELECT` with a `json-parse` transformation, which returned
the rows with parsed JSON
  - a parameterized `SELECT`, which returned the matching row
- a `transaction` that inserts a value containing a single quote and
reads it back, which round-tripped the value
- a query against a missing table, which returned `ER_NO_SUCH_TABLE` as
a serialized error

## Release

Users only get these fixes, and the `deepmerge-ts` fix from prisma#30189, from
a new `7.x` release. Merging into `v7` does not close prisma#30295 or prisma#30052,
so close them when that release ships.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
  * Updated the MySQL client dependency used by the CLI.
* Updated the fast-uri version override to require a newer compatible
release.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
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