Skip to content

fix(deps): bump hono 4.12.18 → 4.12.21 (resolves 4 Dependabot advisories) - #515

Merged
ndycode merged 1 commit into
mainfrom
fix/hono-4.12.21-security
Jun 7, 2026
Merged

fix(deps): bump hono 4.12.18 → 4.12.21 (resolves 4 Dependabot advisories)#515
ndycode merged 1 commit into
mainfrom
fix/hono-4.12.21-security

Conversation

@ndycode

@ndycode ndycode commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Resolves all 4 open Dependabot alerts shown in the repo's Security & quality view. All four are the same root cause: hono pinned below 4.12.21. A single patch-level bump fixes every one.

Alert Severity Advisory Issue
#47 MEDIUM GHSA-3hrh-pfw6-9m5x (CVE-2026-47675) Cookie helper does not sanitize sameSite/priority → Set-Cookie injection
#45 MEDIUM GHSA-2gcr-mfcq-wcc3 (CVE-2026-47676) app.mount() strips mount prefix using undecoded path
#43 MEDIUM GHSA-xrhx-7g5j-rcj5 (CVE-2026-47674) IP-restriction bypass for non-canonical IPv6 deny rules
#41 MEDIUM GHSA-f577-qrjj-4474 (CVE-2026-47673) JWT middleware accepts any Authorization scheme, not only Bearer

Changes

  • package.json — bump hono 4.12.184.12.21 in both dependencies and overrides. Patch within 4.12.x, non-breaking (engines unchanged).
  • package-lock.json — regenerated. Also bumps dev-only brace-expansion 5.0.55.0.6 (via npm audit fix, GHSA-jxxr-4gwj-5jf2). npm audit now reports 0 vulnerabilities.
  • SECURITY.md — override rationale updated to cite 4.12.21 and the four new advisories (enforced by test/documentation.test.ts docs-supplychain-03, which would otherwise fail on drift).
  • README.md — corrected the "Current prerelease" link to v2.3.0-beta.1 (it had drifted to v2.3.0-beta.0 at the last release; this was a pre-existing doc-test failure on main, fixed here while the suite was green).

Exposure note

The loopback bridge (lib/local-bridge.ts) uses only core Hono routing — none of the affected middleware (cookie helper, JWT, IP-restriction, app.mount()). So this is dependency hygiene rather than an exploitable path in this codebase, but it clears the alerts and keeps the supply chain clean.

Verification

  • npm run build
  • npm run typecheck
  • npm run lint
  • npm test ✅ — 4428 passed, 0 failed, 3 skipped
  • npm audit --omit=dev --audit-level=high ✅ — 0 vulnerabilities
  • npm audit (full) ✅ — 0 vulnerabilities

note: greptile review for oc-chatgpt-multi-auth. cite files like lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.

Greptile Summary

patch-level bump of hono from 4.12.18 to 4.12.21, resolving four medium-severity dependabot advisories (Set-Cookie injection, app.mount() path-decoding, IPv6 IP-restriction bypass, jwt scheme acceptance). also bumps dev-only brace-expansion 5.0.55.0.6 and corrects two documentation files.

  • package.json / package-lock.json: hono pinned consistently in both dependencies and overrides; brace-expansion dev bump flows through lockfile only, no override needed since npm audit --omit=dev is clean.
  • SECURITY.md: override rationale updated to 4.12.21 and lists the four new advisories; drops the original GHSA-xh87-mx6m-69f3 authentication-bypass reference that first motivated the pin.
  • README.md: prerelease link corrected from v2.3.0-beta.0v2.3.0-beta.1; target file confirmed present in docs/releases/.

Confidence Score: 4/5

safe to merge — focused patch-level version bump with no logic changes; affected hono middleware is not exercised by lib/local-bridge.ts

all four changed files are correct and consistent. the one minor gap is that SECURITY.md drops the original GHSA-xh87-mx6m-69f3 authentication-bypass advisory from its documented history, which could confuse a future auditor tracing why the override was first introduced.

SECURITY.md — missing historical advisory reference; all other files are clean

Important Files Changed

Filename Overview
package.json bumps hono 4.12.18 → 4.12.21 in both dependencies and overrides; both fields stay in sync
package-lock.json regenerated lockfile; hono and brace-expansion (dev-only) both bumped, integrity hashes updated correctly
SECURITY.md override rationale updated to 4.12.21 and lists 4 new advisories; original GHSA-xh87-mx6m-69f3 authentication-bypass advisory is dropped from the documented history
README.md prerelease link corrected from v2.3.0-beta.0 to v2.3.0-beta.1; target file exists in docs/releases/

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[npm install] --> B{resolve hono}
    B -->|dependencies| C[hono 4.12.21]
    B -->|overrides| C
    C --> D{advisories fixed}
    D --> E[GHSA-3hrh-pfw6-9m5x\nSet-Cookie injection]
    D --> F[GHSA-2gcr-mfcq-wcc3\napp.mount path-decoding]
    D --> G[GHSA-xrhx-7g5j-rcj5\nIPv6 IP-restriction bypass]
    D --> H[GHSA-f577-qrjj-4474\nJWT scheme acceptance]
    A --> I{resolve brace-expansion}
    I -->|dev only| J[brace-expansion 5.0.6\nGHSA-jxxr-4gwj-5jf2 fixed]
Loading

Fix All in Codex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
SECURITY.md:82
the original `GHSA-xh87-mx6m-69f3` authentication-bypass advisory (which first justified pinning hono) is no longer cited anywhere in the rationale. while `<4.12.21` implicitly covers it, dropping the reference breaks the audit trail — a future reader won't know the pin predates these four new advisories or why it was introduced originally.

```suggestion
- `hono`: pinned to `4.12.21` to keep builds out of the vulnerable `<4.12.21` range reported in `GHSA-xh87-mx6m-69f3` (authentication bypass), `GHSA-3hrh-pfw6-9m5x`, `GHSA-2gcr-mfcq-wcc3`, `GHSA-xrhx-7g5j-rcj5`, and `GHSA-f577-qrjj-4474` (Set-Cookie injection, `app.mount()` path-decoding, IPv6 IP-restriction bypass, and JWT scheme-acceptance advisories).
```

Reviews (1): Last reviewed commit: "fix(deps): bump hono 4.12.18 -> 4.12.21 ..." | Re-trigger Greptile

…ries)

Patches all four open MEDIUM Dependabot alerts on hono (<4.12.21):

- GHSA-3hrh-pfw6-9m5x (CVE-2026-47675): Set-Cookie injection via
  unsanitized sameSite/priority in the cookie helper
- GHSA-2gcr-mfcq-wcc3 (CVE-2026-47676): app.mount() strips the mount
  prefix using an undecoded path
- GHSA-xrhx-7g5j-rcj5 (CVE-2026-47674): IP-restriction bypass for
  non-canonical IPv6 deny rules
- GHSA-f577-qrjj-4474 (CVE-2026-47673): JWT middleware accepts any
  Authorization scheme, not only Bearer

The bump is a patch within 4.12.x (non-breaking). The loopback bridge
in lib/local-bridge.ts uses only core Hono routing and none of the
affected middleware, so this is dependency hygiene.

Also pulled in by npm audit fix: brace-expansion 5.0.5 -> 5.0.6
(dev-only, GHSA-jxxr-4gwj-5jf2). npm audit now reports 0 vulnerabilities.

Docs kept in sync with the new pin (enforced by
test/documentation.test.ts docs-supplychain-03):
- SECURITY.md: hono override rationale updated to 4.12.21
- README.md: current prerelease link corrected to v2.3.0-beta.1
  (drifted at the v2.3.0-beta.1 release; was the second failing doc test)

Verified: build, typecheck, lint, and full vitest suite
(4428 passed, 0 failed, 3 skipped) all green.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2d8da10a-626d-49fc-83ec-6da671b1eff0

📥 Commits

Reviewing files that changed from the base of the PR and between d8306d5 and 3c35571.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • README.md
  • SECURITY.md
  • package.json
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Greptile Review
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,ts,env,md}

📄 CodeRabbit inference engine (README.md)

Use camelCase for configuration environment variables with prefixes (e.g., CODEX_MULTI_AUTH_DIR, CODEX_AUTH_FETCH_TIMEOUT_MS)

Files:

  • README.md
  • SECURITY.md
**

⚙️ CodeRabbit configuration file

**: # PROJECT KNOWLEDGE BASE

Generated: 2026-04-25
Commit: a87e005
Branch: main
Package version: 2.2.0

OVERVIEW

codex-multi-auth is a Codex CLI-first OAuth account manager and optional forwarding wrapper for the official Codex CLI. The installed codex-multi-auth entrypoint handles account-management commands locally, codex-multi-auth-codex forwards official Codex commands through this package's wrapper when explicitly used, and runtime rotation can route live Responses traffic through a localhost account-rotation proxy by default. The plugin-host entrypoint remains exported for compatibility, but the primary product surface is the account manager, optional wrapper, storage, runtime proxy, and repair tooling.

STRUCTURE

./
├── scripts/
│   ├── codex.js              # codex-multi-auth-codex wrapper, official CLI forwarder, shadow CODEX_HOME/runtime proxy setup
│   ├── codex-multi-auth.js   # standalone package CLI entrypoint
│   ├── codex-routing.js      # auth command and compatibility alias routing
│   ├── codex-bin-resolver.js # official Codex binary discovery
│   ├── codex-app-router.js   # persistent localhost router for packaged Codex app bind
│   └── codex-app-launcher.js # reversible user-level app launcher routing helper
├── index.ts                  # optional plugin-host runtime entry
├── lib/                      # core runtime logic (see lib/AGENTS.md)
│   ├── auth/                 # OAuth flow, PKCE, callback server
│   ├── runtime/              # Codex CLI/app integration helpers, app bind, live sync, runtime observability
│   ├── request/              # request transform, SSE, failover, backoff
│   ├── storage/              # path resolution, migrations, backups, restore, import/export
│   ├── codex-cli/            # Codex CLI state sync and writer helpers
│   ├── codex-manager/        # command modules and settings panels
│   ├── prompts/              # model-family prompts, GitHub ETag cache
│   ├── recovery/             # conve...

Files:

  • README.md
  • SECURITY.md
  • package.json
**/*.{ts,tsx,js,json}

📄 CodeRabbit inference engine (README.md)

Use JSON format for all machine-readable output (use --json flag for CLI commands and export reports in JSON format)

Files:

  • package.json
package.json

📄 CodeRabbit inference engine (SECURITY.md)

Pin hono dependency to version 4.12.21 or higher to avoid vulnerabilities GHSA-3hrh-pfw6-9m5x, GHSA-2gcr-mfcq-wcc3, GHSA-xrhx-7g5j-rcj5, and GHSA-f577-qrjj-4474

Pin rollup dependency to version ^4.59.0 or higher to avoid vulnerabilities in transitive dependencies

Files:

  • package.json
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:45.362Z
Learning: Implement health checks and account validation through dedicated commands (status, check, verify-flagged) rather than implicit operations
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:45.362Z
Learning: Implement safe, reversible repair operations with --dry-run preview mode before applying fixes
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:45.362Z
Learning: Implement bounded request budgets and cooldown windows to prevent infinite pool rotation and rate-limit exhaustion
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: Never commit auth files, logs, or cache artifacts to the repository
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: PKCE-based OAuth flow must be implemented for handling OAuth credentials
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: Refresh-token lifecycle management and account health isolation must be enforced
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: Runtime rotation proxy must be loopback-only by default and authenticated with a local client key
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: Enable debug/body logging only for short-lived troubleshooting sessions; do not enable `CODEX_PLUGIN_LOG_BODIES=1` in production
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: Do not share `~/.codex/` directories containing sensitive configuration and credentials
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: Review connected apps in ChatGPT settings periodically as part of security hygiene
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: Run `npm run audit:ci` before release and after dependency changes to verify no vulnerable dependencies are introduced
Learnt from: CR
Repo: ndycode/codex-multi-auth

Timestamp: 2026-06-07T19:15:52.486Z
Learning: Run `npm run lint`, `npm run typecheck`, `npm test`, and `npm run build` before release and after dependency changes
📚 Learning: 2026-05-21T00:19:18.672Z
Learnt from: CR
Repo: ndycode/codex-multi-auth PR: 0
File: docs/audits/evidence/dim-LM-release-docs.md:0-0
Timestamp: 2026-05-21T00:19:18.672Z
Learning: Applies to docs/audits/evidence/**/SECURITY.md : Update `SECURITY.md` dependency documentation: change Hono pinned version reference from 4.12.10 to 4.12.14 to match current package.json override

Applied to files:

  • SECURITY.md
🔇 Additional comments (3)
SECURITY.md (1)

82-82: ⚡ Quick win

security override rationale updated correctly.

line 82 now cites hono 4.12.21 and all 4 GHSA advisories (GHSA-3hrh-pfw6-9m5x, GHSA-2gcr-mfcq-wcc3, GHSA-xrhx-7g5j-rcj5, GHSA-f577-qrjj-4474) with accurate vulnerable range <4.12.21 and concise descriptions. matches coding guideline and pr objectives.

Source: Coding guidelines

README.md (1)

386-386: Add/confirm docs link-integrity coverage for release-note prerelease URLs
docs/README.md’s prerelease link targets an existing docs/releases/v2.3.0-beta.1.md (and docs/releases/v2.3.0-beta.0.md still exists). Add/confirm a docs-link integrity test that fails if any docs/README.mddocs/releases/v*.md URL becomes stale.

package.json (1)

179-179: hono 4.12.21 pin in package.json is correct

  • package.json pins hono to 4.12.21 in both dependencies and overrides, and package-lock.json resolves node_modules/hono to hono-4.12.21.tgz.
  • hono@4.12.21 exists on npm, and the cited advisories (GHSA-3hrh-pfw6-9m5x, GHSA-2gcr-mfcq-wcc3, GHSA-xrhx-7g5j-rcj5, GHSA-f577-qrjj-4474) all have firstPatchedVersion: 4.12.21 with vulnerableVersionRange: < 4.12.21.
  • current repo usage of hono is simple routing in lib/local-bridge.ts (no app.mount, no hono cookie/jwt helpers). header/token boundary behavior is already covered by test/local-bridge.test.ts (e.g., cookie/x-api-key/proxy-authorization stripping and authorization replacement) via test/local-bridge.test.ts:236-276 and test/local-bridge.test.ts:292-336, with the runtime baseurl and runtime key gating covered in test/local-bridge.test.ts:175-189 and test/local-bridge.test.ts:278-290 (implementation: lib/local-bridge.ts:90-115, lib/local-bridge.ts:232-326).

📝 Walkthrough

This PR is a security patch that resolves 4 medium-severity vulnerabilities in Hono (4.12.18 → 4.12.21) and is classified as MAJOR from a supply-chain perspective, though it carries low functional risk as a patch-level dependency update with no code changes. The fix addresses critical issues in Hono's Set-Cookie injection, path decoding, IPv6 restriction bypass, and JWT authorization scheme handling; comprehensive regression testing confirms all 4,428 tests pass with zero failures and full build/lint/typecheck validation succeeds.

Changes:

  • Bumped hono dependency and override in package.json from 4.12.18 to 4.12.21 (patch-level, non-breaking)
  • Regenerated package-lock.json; dev dependency brace-expansion updated 5.0.5 → 5.0.6 via npm audit fix
  • Updated SECURITY.md to document the pinned hono version and the four resolved GHSA advisories (CVE-2026-47675, CVE-2026-47676, CVE-2026-47674, CVE-2026-47673)
  • Fixed README.md prerelease link from v2.3.0-beta.0 to v2.3.0-beta.1

Exposure & Verification:
The repo's loopback bridge uses only core Hono routing and is not exposed to the fixed middleware vulnerabilities; this update is purely supply-chain hygiene. All verification checks passed: npm audit reports 0 vulnerabilities, build/typecheck/lint succeeded, and 4,428 unit tests passed with 0 failures and 3 skipped.

Walkthrough

hono dependency updated from 4.12.18 to 4.12.21 across package.json dependencies and overrides. SECURITY.md:82 override rationale revised with updated GHSA advisories. README.md:386 release notes bumped to v2.3.0-beta.1.

Changes

hono security patch and beta.1 release

Layer / File(s) Summary
dependency version bump and documentation sync
package.json, SECURITY.md, README.md
hono pinned to 4.12.21 in both dependencies (package.json:179-182) and overrides (package.json:183-184); override rationale in SECURITY.md:82 updated with new GHSA advisories and vulnerable version ranges; release notes link in README.md:386 updated to v2.3.0-beta.1.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

bug

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning title exceeds 72-character limit at 73 characters; otherwise follows conventional commits format with fix type and lowercase imperative summary. shorten title to 72 chars or fewer. suggest: 'fix(deps): bump hono 4.12.18 → 4.12.21 (resolves GHSA advisories)' (61 chars).
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed description is comprehensive with summary, detailed changes, verification results, and exposure analysis; validation checklist is present but unchecked (author verified manually).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hono-4.12.21-security
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/hono-4.12.21-security

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ndycode
ndycode merged commit 98d9819 into main Jun 7, 2026
2 checks passed
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.

1 participant