Skip to content

Commit 6ce2bec

Browse files
authored
fix: patch flatted CVE-2026-32141 unbounded recursion DoS (#27)
Resolves Dependabot alert [#78](https://github.com/BYK/superset/security/dependabot/78). ## Summary Adds a pnpm override for `flatted >=3.4.0` to fix [CVE-2026-32141](https://nvd.nist.gov/vuln/detail/CVE-2026-32141) (HIGH, CVSS 7.5) — an unbounded recursion DoS in `flatted.parse()` that can crash Node.js with a single crafted payload. ## Details The transitive dependency chain is: ``` eslint → file-entry-cache → flat-cache@4.0.1 → flatted@3.3.4 (vulnerable) ``` `flat-cache@4.0.1` declares `flatted@^3.2.9`, which is semver-compatible with `3.4.0+`, so the override safely forces resolution to the patched version (`3.4.2`) without breaking the dependency contract. This follows the existing override pattern used for `serialize-javascript` and `diff`. ## Changes - **package.json**: Added `"flatted": ">=3.4.0"` to `pnpm.overrides` - **pnpm-lock.yaml**: Regenerated (`flatted@3.3.4` → `flatted@3.4.2`) All 38 tests pass ✅
1 parent 7cfd349 commit 6ce2bec

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

AGENTS.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33

44
### Gotcha
55

6-
<!-- lore:019cc484-f0e1-7016-a851-177fb9ad2cc4 -->
7-
* **AGENTS.md must be excluded from markdown linters**: AGENTS.md is auto-managed by lore and uses \`\*\` list markers and long lines that violate typical remark-lint rules (unordered-list-marker-style, maximum-line-length). When a project uses remark with \`--frail\` (warnings become errors), AGENTS.md will fail CI. Fix: add \`AGENTS.md\` to \`.remarkignore\`. This applies to any lore-managed project with markdown linting.
8-
9-
<!-- lore:019cc40e-e56e-71e9-bc5d-545f97df732b -->
10-
* **Consola prompt cancel returns truthy Symbol, not false**: When a user cancels a \`consola\` / \`@clack/prompts\` confirmation prompt (Ctrl+C), the return value is \`Symbol(clack:cancel)\`, not \`false\`. Since Symbols are truthy in JavaScript, checking \`!confirmed\` will be \`false\` and the code falls through as if the user confirmed. Fix: use \`confirmed !== true\` (strict equality) instead of \`!confirmed\` to correctly handle cancel, false, and any other non-true values.
11-
126
<!-- lore:019cc484-f0e7-7a64-bea1-f3f98e9c56c1 -->
137
* **Craft v2 GitHub App must be installed per-repo**: The Craft v2 release/publish workflows use \`actions/create-github-app-token@v1\` which requires the GitHub App to be installed on the specific repository. If the app is configured for "Only select repositories", adding a new repo to the Craft pipeline requires manually adding it at GitHub Settings → Installations → \[App] → Configure. The \`APP\_ID\` variable and \`APP\_PRIVATE\_KEY\` secret are set in the \`production\` environment, not at repo level. Symptom: 404 on \`GET /repos/{owner}/{repo}/installation\`.
14-
15-
<!-- lore:019cc303-e397-75b9-9762-6f6ad108f50a -->
16-
* **Zod z.coerce.number() converts null to 0 silently**: Zod gotchas in this codebase: (1) \`z.coerce.number()\` passes input through \`Number()\`, so \`null\` silently becomes \`0\`. Be aware if \`null\` vs \`0\` distinction matters. (2) Zod v4 \`.default({})\` short-circuits — it returns the default value without parsing through inner schema defaults. So \`.object({ enabled: z.boolean().default(true) }).default({})\` returns \`{}\`, not \`{ enabled: true }\`. Fix: provide fully-populated default objects. This affected nested config sections in src/config.ts during the v3→v4 upgrade.
178
<!-- End lore-managed section -->

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"pnpm": {
1111
"overrides": {
1212
"serialize-javascript": ">=7.0.3",
13-
"diff": ">=8.0.3"
13+
"diff": ">=8.0.3",
14+
"flatted": ">=3.4.0"
1415
}
1516
},
1617
"devDependencies": {

pnpm-lock.yaml

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)