fix: clear four new advisories, override undici to a patched 8.x - #82
Open
TheAmericanMaker wants to merge 1 commit into
Open
fix: clear four new advisories, override undici to a patched 8.x#82TheAmericanMaker wants to merge 1 commit into
TheAmericanMaker wants to merge 1 commit into
Conversation
The advisory database picked up four new CVEs overnight and the audit gate is failing on main again, blocking every PR. All four are transitive: - fast-uri (high) @modelcontextprotocol/sdk -> ajv - ip-address (high) @modelcontextprotocol/sdk -> express-rate-limit - hono (moderate) @modelcontextprotocol/sdk - undici (high) @earendil-works/pi-coding-agent `npm audit fix` resolves the first three as a lockfile-only change: fast-uri 3.1.4 -> 3.1.5, hono -> 4.13.0, ip-address 10.2.0 -> 10.4.0. undici needs an override. pi-coding-agent pins undici at exactly 8.5.0, and still does on its latest release (0.83.0), so upgrading the dependency does not help. `npm audit fix --force` "fixes" it by downgrading pi-coding-agent from 0.80.10 to 0.75.3 — a major version backwards — which is worse than the advisory. Overriding undici to ^8.10.0 keeps the same major (vulnerable range is 8.0.0-8.8.0) and is the narrowest change that clears the gate. This is a deliberate exception to the "no overrides" posture in #78: it exists because an upstream vendor pins an exact vulnerable version and has shipped no fix. It should be removed once pi-coding-agent unpins or moves past 8.8.0. Verified beyond the unit suite, since undici is the HTTP layer under the Pi agent: 274/274 tests, build clean, MCP initialize + tools/list handshake returns all 18 tools, and the packaged smoke test passes 9/9. `npm audit --omit=dev` now reports 0 vulnerabilities. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainis red right now. The advisory database picked up four new CVEs overnight, so thenpm audit --omit=dev --audit-level=highgate is failing again — which blocks every PR, exactly as it did before #78. This is unrelated to anything merged yesterday.All four are transitive:
fast-uri@modelcontextprotocol/sdk→ajvip-address@modelcontextprotocol/sdk→express-rate-limitundici@earendil-works/pi-coding-agenthono@modelcontextprotocol/sdkThree are a plain lockfile bump
npm audit fixhandlesfast-uri(3.1.4 → 3.1.5),hono(→ 4.13.0), andip-address(10.2.0 → 10.4.0). No manifest change, fully resolved.undici is different — read this before merging
Important
The undici override clears CI. It does not patch users. Treat this PR as CI hygiene, not remediation.
pi-coding-agentpins undici at exactly8.5.0, and still does on its latest release (0.83.0), so upgrading the dependency doesn't help.npm audit fix --force"resolves" it by downgradingpi-coding-agentfrom 0.80.10 to 0.75.3 — a major version backwards — which is worse than the advisory.That leaves
"overrides": { "undici": "^8.10.0" }. It clears the gate here, but I packed the tarball and installed it as a real consumer to check whether it actually protects anyone:npm only honors
overridesfrom the root package. In a consumer's tree this package is a dependency, so the field ships in the manifest and is ignored.pi-coding-agentis also apeerDependency, so npm resolves it in the consumer's tree where our constraint has no say.So a green audit badge on this repo will not mean installed users are patched. Worth knowing before anyone reads CI as an all-clear.
Actual exposure
Lower than the severity label suggests, for two reasons.
It isn't reachable from the MCP surface. Tracing the module graph from
dist/mcp-server/bin.mjsreaches 17 modules, none of which value-importpi-coding-agent— every MCP-side import isimport typeand erased at compile time. The value imports (createAgentSession,compact,SessionManager) live only inagent-runner,agent-rewriter,dashboard-narrator, andphase-compaction. undici only executes on the Pi extension surface.The advisories target shapes this doesn't have. Three of five are cross-user information disclosure via shared caches or a proxy serving multiple users; the others are CRLF injection via a blob body
typeand cookie attribute injection. A single-user local process talking to a trusted LLM endpoint has no multi-tenant cache and no untrusted intermediary. The realistic residual is the parse-time crash — a local DoS.The real fix is upstream
pi-coding-agentneeds to unpin undici or move past 8.8.0. The exact pin is what makes this unfixable downstream — every consumer of theirs inherits it. This override should be removed once that lands.Verification
npm audit --omit=dev→ 0 vulnerabilities in this repo (see caveat above re: consumers)initialize+tools/listhandshake returns all 18 toolsnpm run smoke) passes 9/9 against the real tarball🤖 Generated with Claude Code