@lenne.tech/nest-server 12.6.17 → 12.6.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -622,7 +622,10 @@ statements run in the session the framework set up (strict mode, UTC). On MongoD
622
622
  `mysql2`'s client-side escaping (`sql-escaper`), and `/iam/update-user` accepts any JSON for `name` and `image`. From
623
623
  `sql-escaper` 1.5.1 on, an object turns into `key = value` pairs only after a bare `SET ?`, which Kysely never writes
624
624
  (it writes `col = ?`); before that, `{"name": {"roles": "[\"admin\"]"}}` assigned `roles` — a signed-in user making
625
- themselves an administrator. The peer range (`>= 3.24.6`) guarantees the fixed escaper; never lower it.
625
+ themselves an administrator. The peer range (`>= 3.24.6`; `>= 3.25.0` since 12.6.18, for GHSA-f763-mv98-7rv9)
626
+ guarantees the fixed escaper; never lower it. mysql2 3.26.0 refuses `caching_sha2_password` (MySQL 8.4's default)
627
+ over a connection without TLS unless `allowPublicKeyRetrieval` or `serverPublicKey` is set
628
+ (`PUBLIC_KEY_RETRIEVAL_NOT_ALLOWED`, measured 2026-12-04); raising the floor to it needs that decision first.
626
629
 
627
630
  **Sign-up holds a pool connection while it hashes (accepted).** Better-Auth runs its Kysely adapter with transactions
628
631
  on a `pg` pool, and `/sign-up/email` hashes the password inside its transaction — on the framework's application pool
package/FRAMEWORK-API.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lenne.tech/nest-server — Framework API Reference
2
2
 
3
- > Auto-generated from source code as of 2026-12-02 (v12.6.17)
3
+ > Auto-generated from source code as of 2026-12-04 (v12.6.18)
4
4
  > File: `FRAMEWORK-API.md` — compact, machine-readable API surface for Claude Code
5
5
 
6
6
  ## CoreModule.forRoot()
@@ -0,0 +1,80 @@
1
+ # Migration Guide: 12.6.17 → 12.6.18
2
+
3
+ ## Overview
4
+
5
+ | Category | Details |
6
+ |---|---|
7
+ | **Breaking Changes** | None. The `mysql2` peer range starts at 3.25.0 instead of 3.24.6 (§2) |
8
+ | **New Features** | None |
9
+ | **Bugfixes** | None |
10
+ | **Security** | undici 7.30.5 (13 advisories of 2026-12-04 on 7.30.2, seven high) and nodemailer 10.6.3 (GHSA-w5r8-mmxv-957g) (§1); mysql2 3.25.0 clears GHSA-f763-mv98-7rv9 (high) (§2) |
11
+ | **Migration Effort** | None for an npm-mode project. A project on MySQL raises its own `mysql2` to 3.25.0. A project that installs with `--frozen-lockfile` before 2026-12-05 13:05 UTC adds one `minimumReleaseAgeExclude` entry (§1) |
12
+
13
+ ## Quick Migration
14
+
15
+ ```bash
16
+ pnpm add @lenne.tech/nest-server@12.6.18
17
+ pnpm run update # nest-server-starter based projects: raises the project's mysql2 to 3.25.0
18
+ pnpm audit
19
+ pnpm run build
20
+ pnpm test
21
+ ```
22
+
23
+ **Vendor mode**: run `/lt-dev:backend:update-nest-server-core` as usual, then raise the project's own `undici` to
24
+ 7.30.5 and `nodemailer` to 10.6.3 (and `mysql2` to 3.25.0 on MySQL): in vendor mode they are the project's
25
+ dependencies.
26
+
27
+ ## 1. Security: undici 7.30.5 and nodemailer 10.6.3
28
+
29
+ nodejs/undici published 13 advisories for the 7.x line on 2026-12-04; all of them cover the 7.30.2 that 12.6.17
30
+ ships, seven are high, and all are fixed in 7.30.4 (7.30.5 adds only a RISC-V build fix). Among them:
31
+
32
+ - **GHSA-fgj4-8x8v-fqhm** (high): the redirect interceptor verified a cross-origin redirect target's certificate
33
+ against the first host's name.
34
+ - **GHSA-h5rf-4xrf-76mc** (high): an assertion in the HTTP/1.1 response parser ends the process from `request()`
35
+ and `fetch()`.
36
+
37
+ The framework uses undici for `outboundFetch()`, the guarded fetch for URLs users enter (webhooks, export targets).
38
+ nodemailer 10.6.3 closes **GHSA-w5r8-mmxv-957g** (moderate: `attachDataUrls` leaks inline images into later
39
+ messages). Both are repository advisories that GitHub's global database does not list yet, so `pnpm audit` does not
40
+ report them.
41
+
42
+ **undici 7.30.5 is younger than pnpm's default release-age window (24 hours) until 2026-12-05 13:05 UTC.** An
43
+ install that resolves anew warns and continues; an install with `--frozen-lockfile` (CI, Docker) refuses it until
44
+ then. Add the exact version to `pnpm-workspace.yaml` and remove the entry after that time:
45
+
46
+ ```yaml
47
+ minimumReleaseAgeExclude:
48
+ - 'undici@7.30.5' # nest-server 12.6.18, undici advisories of 2026-12-04; remove after 2026-12-05 13:05 UTC
49
+ ```
50
+
51
+ ## 2. Security: mysql2 at least 3.25.0
52
+
53
+ **Action needed** in every project on MySQL or MariaDB. `mysql2` is an optional peer: the project installs it, so
54
+ its own pin decides which version runs.
55
+
56
+ - **GHSA-f763-mv98-7rv9** (high, mysql2 <= 3.24.6): SQL injection when the server runs with
57
+ `NO_BACKSLASH_ESCAPES`. The framework's own session sets backslash escapes, so its statements are not affected; a
58
+ project's own pool or a changed `sql_mode` is.
59
+
60
+ 12.6.18 is tested against mysql2 3.25.0 and declares the peer range `>=3.25.0 <4`.
61
+
62
+ **Do not take mysql2 3.26 without TLS yet.** It closes two moderate advisories by refusing to fetch the server's RSA
63
+ key over a connection without TLS: on MySQL 8.4 (default `caching_sha2_password`) every connection without TLS then
64
+ fails with `PUBLIC_KEY_RETRIEVAL_NOT_ALLOWED` after a server restart. Connect over TLS (`?ssl=…` in the URL) or set
65
+ `?allowPublicKeyRetrieval=true` on a trusted network first. MariaDB is not affected.
66
+
67
+ ## Troubleshooting
68
+
69
+ | Symptom | Cause | Fix |
70
+ |---|---|---|
71
+ | `ERR_PNPM_NO_MATURE_MATCHING_VERSION` for `undici@7.30.5` | `--frozen-lockfile` install inside the 24-hour window (§1) | `minimumReleaseAgeExclude: ['undici@7.30.5']`, removed after 2026-12-05 13:05 UTC |
72
+ | `unmet peer mysql2@">=3.25.0 <4"` warning | the project pins mysql2 3.24.x or older (§2) | `pnpm run update`, or `pnpm add mysql2@3.25.0` |
73
+ | `PUBLIC_KEY_RETRIEVAL_NOT_ALLOWED` | mysql2 3.26 on MySQL 8.4 without TLS (§2) | stay on 3.25.0, or connect over TLS |
74
+
75
+ ## Module Documentation
76
+
77
+ - [undici security advisories](https://github.com/nodejs/undici/security/advisories)
78
+ - [GHSA-w5r8-mmxv-957g](https://github.com/nodemailer/nodemailer/security/advisories/GHSA-w5r8-mmxv-957g)
79
+ - [GHSA-f763-mv98-7rv9](https://github.com/sidorares/node-mysql2/security/advisories/GHSA-f763-mv98-7rv9)
80
+ - `.claude/rules/persistence.md`: the SQL drivers are optional peers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lenne.tech/nest-server",
3
- "version": "12.6.17",
3
+ "version": "12.6.18",
4
4
  "type": "module",
5
5
  "description": "Server framework in TypeScript on top of NestJS: GraphQL and REST APIs on MongoDB, PostgreSQL, MySQL or MariaDB, with authentication, field-level permissions, multi-tenancy, offline sync and an AI assistant.",
6
6
  "keywords": [
@@ -141,7 +141,7 @@
141
141
  "lodash": "4.18.1",
142
142
  "multer": "2.5.0",
143
143
  "node-mailjet": "6.0.11",
144
- "nodemailer": "10.4.1",
144
+ "nodemailer": "10.6.3",
145
145
  "object-path": "0.11.8",
146
146
  "passport": "0.7.0",
147
147
  "passport-jwt": "4.0.1",
@@ -150,7 +150,7 @@
150
150
  "rxjs": "7.8.2",
151
151
  "supertest": "7.3.1",
152
152
  "ts-morph": "28.0.0",
153
- "undici": "7.30.2",
153
+ "undici": "7.30.5",
154
154
  "ws": "8.23.0",
155
155
  "yuml-diagram": "1.2.0"
156
156
  },
@@ -170,7 +170,7 @@
170
170
  "kysely": ">=0.29.0 <0.30.0",
171
171
  "mongodb": ">=7.8.0 <8",
172
172
  "mongoose": ">=9.12.2 <10",
173
- "mysql2": ">=3.24.6 <4",
173
+ "mysql2": ">=3.25.0 <4",
174
174
  "pg": ">=8.23.0 <9",
175
175
  "typeorm": ">=1.1.0 <2"
176
176
  },
@@ -265,7 +265,7 @@
265
265
  "kysely": "0.29.8",
266
266
  "mongodb": "7.8.0",
267
267
  "mongoose": "9.12.3",
268
- "mysql2": "3.24.6",
268
+ "mysql2": "3.25.0",
269
269
  "nodemon": "3.1.14",
270
270
  "otpauth": "9.6.0",
271
271
  "oxfmt": "0.75.0",
@@ -274,7 +274,7 @@
274
274
  "pg": "8.23.1",
275
275
  "playwright-core": "1.64.1",
276
276
  "rimraf": "6.1.4",
277
- "smtp-server": "3.21.3",
277
+ "smtp-server": "3.21.9",
278
278
  "tsx": "4.23.15",
279
279
  "tus-js-client": "4.3.1",
280
280
  "typeorm": "1.1.2",