Skip to content

Sanitize ANSI terminal escape sequences in pnpm licenses output #92

Closed
pnpm/pnpm
#16613

Description

@zkochan

Summary

The pnpm licenses command renders package metadata fields (license, author, homepage, description) directly from installed dependencies' package.json into terminal table output.

If a package manifest contains ANSI escape sequences (e.g. terminal control sequences or hyperlink OSC sequences), these are written unescaped to the user's terminal.

Affected Components

  • deps/compliance/commands/src/licenses/outputRenderer.ts
  • Table rendering in v11 and v12

Suggested Fix

Strip ANSI escape sequences from untrusted package manifest strings before rendering them to the terminal.

Context

Originally reported in GHSA-r8h2-fw6m-qq88 by iaohkut-from-NightWolf-Team.

Activity

  1. zkochan commented on Oct 5, 2026

    @zkochan
    MemberAuthor

    Opened pnpm/pnpm#16613 to address this task. Sanitizes untrusted package metadata before rendering license information to the terminal. JSON output preserves the original metadata as escaped data.


    Written by an agent (Codex, GPT-6).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions