Skip to content

fix(multi-parser)!: drop unmaintained Parser API v1/v2 to fix jsonpath-plus vulnerability - #1242

Open
taylormckayagility wants to merge 1 commit into
asyncapi:masterfrom
taylormckayagility:fix/multi-parser-drop-vulnerable-legacy-parsers
Open

fix(multi-parser)!: drop unmaintained Parser API v1/v2 to fix jsonpath-plus vulnerability#1242
taylormckayagility wants to merge 1 commit into
asyncapi:masterfrom
taylormckayagility:fix/multi-parser-drop-vulnerable-legacy-parsers

Conversation

@taylormckayagility

Copy link
Copy Markdown

What

@asyncapi/multi-parser aliases two legacy dependencies:

  • parserapiv1@asyncapi/parser@2.1.0
  • parserapiv2@asyncapi/parser@3.0.0-next-major-spec.8

Both are frozen, unmaintained releases (no 2.1.x patch has ever shipped past 2.1.2, and the 3.0.0-next-major-spec.* prerelease line was superseded long ago by the stable 3.x release) and both pin the vulnerable jsonpath-plus@^7.2.0. Since they're unmaintained, they can never receive a security patch through a normal release — the vulnerability is structurally permanent as long as multi-parser depends on them.

This PR removes the parserapiv1/parserapiv2 aliases entirely. NewParser() and ConvertDocumentParserAPIVersion() now throw a clear, actionable error when Parser API v1 or v2 is requested, pointing callers to Parser API v3 — which already depends on the patched jsonpath-plus@^10.0.7 (via #1058 and #1062).

Why this approach, and not #1086

Fixes #1065.

Supersedes #1086, which is still open and unresolved. That PR forced jsonpath-plus to ^10.0.7 via npm overrides injected into the old parserapiv1/parserapiv2 dependency trees, without changing which parser version backs v1/v2. The problem: those old parser codebases (2.1.0 and 3.0.0-next-major-spec.8) were only ever tested against jsonpath-plus 7.x's query behavior, and jsonpath-plus 10.x changed that behavior — CI hung indefinitely as a result (comment). @shivansh-source flagged this as a workaround rather than a root-cause fix, and @kraenhansen asked for a better alternative approach.

This PR is that alternative: rather than forcing an untested dependency version into dead code, it retires the dead code path. Parser API v1 and v2 consumers get a clear migration error instead of a silently-still-vulnerable dependency.

Breaking change

This is a major release for @asyncapi/multi-parser (changeset included). NewParser(1), NewParser(2), and ConvertDocumentParserAPIVersion(doc, 1) / (doc, 2) now throw instead of returning a v1/v2 parser or document. Callers must migrate to Parser API v3.

Verification

  • npx turbo run build --filter=@asyncapi/multi-parser... — builds clean, no leftover references to parserapiv1/parserapiv2.
  • npm run test:unit in packages/multi-parser — full suite passes (10/10), and does not hang, unlike feat(multi-parser)!: force json-path-plus to be ^10.0.7 due to security fixed bug #1086.
  • npm ls jsonpath-plus at the repo root shows only jsonpath-plus@10.4.0 in the tree — the vulnerable 7.2.0 line is fully gone.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_0126g1scxgfBLx1rJTLXqeUR

…h-plus vuln

@asyncapi/multi-parser aliased its parserapiv1 and parserapiv2 dependencies
to @asyncapi/parser@2.1.0 and @asyncapi/parser@3.0.0-next-major-spec.8,
both of which pin jsonpath-plus@^7.2.0 and are unmaintained releases that
will never get a security patch (fixes asyncapi#1065).

PR asyncapi#1086 tried to work around this by forcing jsonpath-plus to ^10.0.7 via
npm overrides inside those old dependency trees, but they were never tested
against jsonpath-plus 10.x's changed query behavior and CI hung as a result.

Instead, drop Parser API v1/v2 support entirely: NewParser() and
ConvertDocumentParserAPIVersion() now throw a clear error directing callers
to Parser API v3, which already depends on the patched jsonpath-plus.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126g1scxgfBLx1rJTLXqeUR
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b483c44

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/multi-parser Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

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.

[BUG] @asyncapi/multi-parser still depending on vulnerable version of jsonpath-plus

1 participant