[Aikido] Fix 45 security issues in fast-uri, hono - #14
Open
aikido-autofix[bot] wants to merge 1 commit into
Open
[Aikido] Fix 45 security issues in fast-uri, hono#14aikido-autofix[bot] wants to merge 1 commit into
aikido-autofix[bot] wants to merge 1 commit into
Conversation
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.
Upgrade fast-uri and hono to fix critical SSRF/host-bypass and path-traversal vulnerabilities in URI parsing, normalization, and authority handling.
All breaking changes by upgrading hono from version 4.12.5 to 4.13.5 (CHANGELOG)
/.hono/cache?__hono_cache_key=...instead of original request URL, requiring updates to any external cache purging logic that usescaches.delete()with the original request URLRefObject<T>type changed to{ current: T }requiring nullable refs to be typed asRefObject<T | null>anduseRef(undefined)to be passed instead ofuseRef()UnsupportedPathErrorat route registration time instead of at first matching request, causing misconfigured routes to fail at startup rather than runtime✅ 45 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
\\or/\) thatfast-uritreats as paths but Node's URL parser treats as authority, enabling redirection to unintended destinations.%2fand%0d%0a. This enables URL redirection bypasses, allowlist evasion, and header injection attacks on applications normalizing untrusted URLs.Content-Lengthwas missing or bodies were chunked, due to asynchronous limit enforcement. This could enable DoS attacks or unintended data processing despite configured size restrictions.setCookie(),serialize(), orserializeSigned(), allowing invalid characters that can cause malformed Set-Cookie headers and runtime errors. While modern runtimes reject these invalid headers before sending, this creates inconsistent validation between cookie parsing and serialization.parseBody({ dot: true })where specially crafted form field names like__proto__.xcreate objects with__proto__properties, potentially enabling prototype pollution if merged unsafely into other objects.jsx()andcreateElement(), allowing untrusted tag input to inject markup and reshape generated HTML, potentially enabling XSS attacks.🤖 Remediation details
Fix high/medium/low severity vulnerabilities in
honoandfast-uriShort summary
This PR remediates a series of security advisories affecting two packages:
hono(the HTTP framework used directly in theapps/workerworkspace member) andfast-uri(a transitive dependency resolved throughajv). The fix updates the declared version range forhonoinapps/worker/package.jsonand refreshespnpm-lock.yamlto resolve both packages to their patched versions.hono
honois declared as a direct dependency inapps/worker/package.json. The installed version4.12.5fell within the vulnerable ranges for all listed advisories, with the highest patched floor being4.12.25. The declared range was bumped from^4.7.0to^4.12.25, which pnpm resolved to4.13.5(the latest compatible release), clearing every advisory against this package in a single manifest edit and lockfile refresh.fast-uri
fast-uriis a transitive dependency pulled in byajv@8.18.0, which declares it as^3.0.1. The installed version3.1.0was vulnerable across all listed advisories, with the required patched floor being3.1.6. Becauseajv@8.18.0was already the first fixing parent version and its declared range already admitted3.1.6, no parent bump was required — a lockfile-only refresh was sufficient. The--safe-chain-skip-minimum-package-ageflag was needed to allow pnpm's resolver to select the newerfast-urirelease, which it had been suppressing due to its minimum package age supply-chain policy.Version changes
hono^4.7.0(resolved4.12.5)^4.12.25(resolved4.13.5)fast-uri3.1.03.1.6ajv@8.18.0Note
Medium Risk
Upgrades security-sensitive HTTP/URI libraries on the worker without code changes; validate worker routes and JSX pages after deploy, especially if you later adopt Hono cache or stricter router registration.
Overview
Security dependency refresh for the Cloudflare worker HTTP stack and transitive URI parsing used elsewhere in the monorepo.
apps/worker/package.jsonraises the directhonorange from^4.7.0to^4.13.5(lockfile resolves4.12.5→4.13.5).pnpm-lock.yamlis regenerated sofast-urimoves3.1.0→3.1.6underajv, along with minor lockfile metadata (e.g.libcon platform packages) and dropping unused optionaltsxfrom the worker’s Vite dependency tree.No worker source changes—only manifest and lockfile. Hono 4.13 can change cache middleware keying, JSX
RefObjecttyping, and RegExpRouter startup errors; this app uses coreHono,hono/factory, andhono/jsxrouting/HTML, not the cache or serve-static middleware called out in the advisory list.Reviewed by Cursor Bugbot for commit 4b4253e. Bugbot is set up for automated code reviews on this repo. Configure here.