Skip to content

deps: js-yaml 3.x -> 4.x major bump needed (CVE-2026-53550) #3221

Closed

Description

@cixzhang

Dependabot alert 87 flags a DoS vulnerability in js-yaml (CVE-2026-53550).

Current version: 3.14.2 (transitive via @changesets/cli -> @manypkg/get-packages -> read-yaml-file)
Patched version: 4.2.0

This is a major version bump (3.x to 4.x). The dependency chain is:

@changesets/cli -> @manypkg/get-packages -> read-yaml-file -> [email protected]

A pnpm override for js-yaml to ^4.2.0 may break read-yaml-file since js-yaml 4.x dropped several APIs (e.g. safeLoad removed, replaced by load). Needs verification or an upstream fix in @changesets/cli.

Advisory: GHSA-h67p-54hq-rp68

Risk: Low for this project. The vulnerable code path (merge key aliasing) would only trigger if processing untrusted YAML. Changeset YAML files are authored locally.

Activity

  1. added
    dependencies
    on Jun 28, 2026
  2. durvesh1992 commented on Jun 28, 2026

    @durvesh1992
    Contributor

    Confirmed the override risk you flagged — a plain pnpm.overrides bump to js-yaml@^4 will break the changeset tooling at runtime:

    • read-yaml-file/index.js (line 8) calls yaml.safeLoad(...), and its package.json pins js-yaml: ^3.6.1.
    • js-yaml 4.x removed safeLoad (it's load now), so forcing 4.x makes read-yaml-file throw yaml.safeLoad is not a function whenever @manypkg/get-packages reads YAML (e.g. pnpm-workspace.yaml) — which @changesets/cli does on basically every invocation.

    So an override alone isn't safe here. Viable paths:

    1. pnpm patch read-yaml-file → change safeLoad → load (and safeDump→dump if present), then add the js-yaml: ^4.2.0 override. Small, self-contained, fully under this repo's control.
    2. Upstream: bump read-yaml-file / @manypkg/get-packages / @changesets/cli to versions that use js-yaml 4.x (if available), then drop the override.

    Given the advisory's low practical risk here (changeset YAML is locally authored, not untrusted), option 1 is probably the cleanest stopgap. Happy to put up the pnpm patch version if that direction sounds good — flagging first since it touches the release tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependencies

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions