Skip to content

fix: deps upgrade, proper prettier types, expose augmented ast types#781

Merged
leonidaz merged 21 commits intomainfrom
copilot/fix-ripple-vulnerability
Mar 5, 2026
Merged

fix: deps upgrade, proper prettier types, expose augmented ast types#781
leonidaz merged 21 commits intomainfrom
copilot/fix-ripple-vulnerability

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 3, 2026

koa < 3.1.2 allows Host Header Injection via ctx.hostname, enabling attacks like password reset poisoning and OAuth callback manipulation. Affected version (3.1.1) enters the dependency graph via rulesync → fastmcp → mcp-proxy → pipenet → koa.

Changes

  • package.json — adds pnpm.overrides to force koa to >=3.1.2 across all transitive resolutions
  • pnpm-lock.yaml — updated to resolve koa@3.1.2
"pnpm": {
  "overrides": {
    "koa": ">=3.1.2"
  }
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Vulnerability in ripple project</issue_title>
<issue_description>While working on ripple project, I identified CVE-2026-27959 affecting the Koa package. The issue is caused by improper parsing of the HTTP Host header in the ctx.hostname API, where malformed values containing special characters can manipulate the resolved hostname. This could enable attacks such as password reset poisoning, email verification bypass, and OAuth callback manipulation, potentially leading to account compromise.

CVE Link
CVE Report</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: Ripple
An AI assistant specialized in the Ripple TypeScript UI framework


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.


Note

Medium Risk
Touches formatting/printing logic and AST typing across the Prettier and ESLint plugins, which can change output and lint behavior across many files despite being largely type/compatibility driven.

Overview
Updates build/tooling dependencies and bundler configs (Tree-sitter node-addon-api/tree-sitter-cli/node-gyp, Rollup plugin deps, and multiple tsdown configs) to newer versions and more explicit output settings.

Exposes Ripple’s augmented compiler AST typings as public ripple/types/* exports (new estree, estree-jsx, acorn re-export .d.ts files) and shifts downstream packages (eslint-plugin, prettier-plugin) off direct estree/estree-jsx types to these unified types.

Refactors the Prettier plugin to use the new typed AST surface (e.g., start/end locations, comment handling, rest parameter/type annotation printing, JSX namespaced tag printing, and TS mapped modifier handling) and adds regression tests for rest params, mapped modifiers, and namespaced tags.

Written by Cursor Bugbot for commit ca77822. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
new-website Ready Ready Preview, Comment Mar 5, 2026 1:44am
ripple Ready Ready Preview, Comment Mar 5, 2026 1:44am

Request Review

Co-authored-by: trueadm <1519870+trueadm@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix vulnerability in ripple project related to Koa package fix: patch CVE-2026-27959 (Koa Host Header Injection) Mar 3, 2026
@leonidaz
Copy link
Copy Markdown
Collaborator

leonidaz commented Mar 3, 2026

@copilot what package has this koa dependency?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 3, 2026

@copilot what package has this koa dependency?

The koa dependency comes in transitively through the rulesync dev dependency:

rulesync → fastmcp → mcp-proxy → pipenet → koa@3.1.1

rulesync is used in the root package.json to generate AI agent instruction files (e.g., CLAUDE.md, AGENTS.md).

@leonidaz
Copy link
Copy Markdown
Collaborator

leonidaz commented Mar 3, 2026

@cursor review

we should probably try upgrading rulesync to 7.12.2 in the pnpm-workspace.yaml

Co-authored-by: Leonidas <leonidaz@users.noreply.github.com>
Co-authored-by: Leonidas <leonidaz@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@leonidaz leonidaz left a comment

Choose a reason for hiding this comment

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

@cursor review

and make changes as commits to this branch

Co-authored-by: Leonidas <leonidaz@users.noreply.github.com>
Refactor to use context.sourceCode directly instead of casting.
@leonidaz leonidaz changed the title fix: patch CVE-2026-27959 (Koa Host Header Injection) fix: deps upgrade, proper prettier types, expose augmented ast types Mar 5, 2026
Co-authored-by: Leonidas <leonidaz@users.noreply.github.com>
@leonidaz
Copy link
Copy Markdown
Collaborator

leonidaz commented Mar 5, 2026

@cursor review

cursoragent and others added 2 commits March 5, 2026 01:38
Co-authored-by: Leonidas <leonidaz@users.noreply.github.com>
Co-authored-by: Leonidas <leonidaz@users.noreply.github.com>
@leonidaz
Copy link
Copy Markdown
Collaborator

leonidaz commented Mar 5, 2026

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@leonidaz leonidaz marked this pull request as ready for review March 5, 2026 02:59
@leonidaz leonidaz merged commit cbbee3c into main Mar 5, 2026
15 checks passed
@leonidaz leonidaz deleted the copilot/fix-ripple-vulnerability branch March 5, 2026 03:13
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.

Vulnerability in ripple project

4 participants