Skip to content

fix: address high CVEs in js-yaml and nanoid - #34

Merged
RubenGlez merged 1 commit into
mainfrom
fix/high-cves
Aug 14, 2026
Merged

fix: address high CVEs in js-yaml and nanoid#34
RubenGlez merged 1 commit into
mainfrom
fix/high-cves

Conversation

@RubenGlez

Copy link
Copy Markdown
Owner

Unblocks pnpm release, whose gate is pnpm audit --audit-level=high --prod.

Advisory Severity Path Fix
GHSA-5p4m-2wfm-xmqj — js-yaml quadratic CPU consumption in !!omap resolution high apps/dashboard > js-yaml, packages/cli > js-yaml >=4.3.1
GHSA-2v37-7h3g-55p8 — nanoid custom generators loop indefinitely when size is zero high apps/dashboard > next > postcss > nanoid >=3.3.18

Notes

js-yaml is bumped in the manifests, not only the override. It's a direct dependency of @easydocs/cli and @easydocs/dashboard, and overrides apply only inside this repo — consumers installing the published packages would still resolve the vulnerable range. Both manifests now declare ^4.3.1; the override moved from ^4.1.1 to ^4.3.1 to match.

nanoid stays on the 3.x line. It's only reached transitively through next > postcss, and postcss pins ^3.3.x, so an override to 5.x would break resolution.

Both patched versions clear the repo's minimumReleaseAge: 1440 (js-yaml 4.3.1 published 2026-07-31, nanoid 3.3.18 on 2026-08-07), so no minimumReleaseAgeExclude entry is needed.

Verification

  • pnpm audit --audit-level=high --prod exits 0. Two low-severity advisories remain (@babel/core, body-parser), both under the gate's threshold.
  • build, lint, typecheck green; 212 tests pass.
  • Exercised js-yaml behaviourally through the CLI, since it's the dependency with real code paths here: diff on two YAML specs correctly reports the breaking change and exits 3 (parse path), and export --yaml emits valid YAML (dump path).

Not included

No CHANGELOG entry, matching the convention of the previous CVE sweep (1becbb5), and to keep this branch conflict-free against #33. The js-yaml bump is user-facing for the published CLI, so it's worth a ### Security line whenever the next version is cut.

Independent of #33 — both touch pnpm-lock.yaml, so whichever merges second needs a lockfile regeneration.

https://claude.ai/code/session_01GrfumUQ4vFUAgsFYwzDyK8

- js-yaml >=4.0.0 <4.3.1 (GHSA-5p4m-2wfm-xmqj, high): quadratic CPU
  consumption resolving !!omap. Reached from both apps/dashboard and
  packages/cli. Bumped the declared dependency in each, not just the
  override, because overrides don't apply to consumers of the published
  @easydocs/cli and @easydocs/dashboard.
- nanoid <3.3.18 (GHSA-2v37-7h3g-55p8, high): custom generators loop
  indefinitely when size is zero. Only reached via next > postcss, which
  pins ^3.3.x, so the override stays on the 3.x line.

`pnpm audit --audit-level=high --prod` now exits 0, unblocking `pnpm release`.
Two low-severity advisories remain (@babel/core, body-parser), both below
the release gate's threshold.

Claude-Session: https://claude.ai/code/session_01GrfumUQ4vFUAgsFYwzDyK8
@RubenGlez
RubenGlez merged commit cadb43c into main Aug 14, 2026
2 checks passed
@RubenGlez
RubenGlez deleted the fix/high-cves branch August 14, 2026 12:53
RubenGlez added a commit that referenced this pull request Aug 14, 2026
Folds in the js-yaml and nanoid CVE patches from #34, which landed
without their own entry, under a Security heading.

Claude-Session: https://claude.ai/code/session_01GrfumUQ4vFUAgsFYwzDyK8
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