Skip to content

[Aikido] Fix 9 security issues in fast-uri, mysql2, zod and 2 more#9

Open
aikido-autofix-us[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-1063991-82yu
Open

[Aikido] Fix 9 security issues in fast-uri, mysql2, zod and 2 more#9
aikido-autofix-us[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-1063991-82yu

Conversation

@aikido-autofix-us

@aikido-autofix-us aikido-autofix-us Bot commented Jul 20, 2026

Copy link
Copy Markdown

Upgrade dependencies to fix URI parsing SSRF bypasses, SQL injection via type confusion, and zlib decompression DoS attacks.

⚠️ Incomplete breaking changes analysis (4/5 analyzed)

⚠️ Breaking changes analysis not available for: pino

zod (3.25.76 => 4.4.0):

The codebase uses zod in three locations:

  • cockpit/src/bridge/events-gateway.ts: Uses BaseEvent.extend() to create event schemas, but BaseEvent has no refinements

  • src/config/env.ts: Uses EnvSchema.refine() but the schema is never used with .extend(), .pick(), .omit(), or .merge()

  • src/routes/index.ts: Only imports zod but doesn't use it (uses Fastify JSON schemas instead)

None of the breaking changes affect this codebase:

  • .extend() is only used on BaseEvent which has no refinements

  • No usage of .pick(), .omit(), or .merge() on any schemas

  • No tuple schemas with defaults

  • No z.undefined() on required properties

  • No z.strictObject() intersections

  • .url() validation is used but all URLs in the codebase are properly formatted with ://

  • No base64 or CUID validation

@hono/node-server (1.19.11 => 2.0.5):

The package appears in package-lock.json but is not listed in package.json dependencies and is not imported or used anywhere in the codebase. The project already requires Node.js >=20.0.0 in package.json, which satisfies the new requirement.

All breaking changes by upgrading mysql2 from version 3.15.3 to 3.23.1 (CHANGELOG)

Version Description
3.17.0
Security fix resolves a potential SQL injection bypass through objects, which may restrict previously accepted object inputs in queries
3.22.0
mysql_clear_password plugin is now disabled by default, requiring explicit enablement for code that previously relied on it
3.23.0
Unsafe integers inside JSON columns are now returned as exact strings when supportBigNumbers is enabled, changing the data type from number to string

All breaking changes by upgrading zod from version 3.25.76 to 4.4.3 (CHANGELOG)

Version Description
4.3.0
.pick() and .omit() disallowed on object schemas containing refinements - now throws an error instead of silently dropping refinements
4.3.0
Overwriting properties with .extend() disallowed on object schemas with refinements - throws error when overwriting existing properties
4.3.0
Object masking methods (.pick(), .omit()) now validate that the keys provided actually exist in the schema and throw errors for unrecognized keys
4.3.0
Intersections with z.strictObject() now only reject keys unrecognized by both sides instead of either side
4.4.0
Tuple defaults now materialize output values correctly - defaults in tuple positions now properly appear in parsed output, and trailing optional elements behavior has changed
4.4.0
Required object properties with z.undefined() are now treated as required - the key must be present even though its value may be undefined
4.4.0
.merge() now throws when the receiver has refinements instead of silently producing ambiguous refinement behavior
4.4.0
JSON Schema $defs entries no longer include redundant id fields
4.4.0
Base64 validation now rejects whitespace instead of allowing atob()-style whitespace stripping
4.4.0
CUID validation has been tightened and CUID v1 is now deprecated
4.4.0
HTTP URL validation now rejects malformed HTTP(S) URLs with a missing slash after the protocol

All breaking changes by upgrading @hono/node-server from version 1.19.11 to 2.0.5 (CHANGELOG)

Version Description
2.0.0
Dropped support for Node.js v18; now requires Node.js v20 or later
2.0.0
Removed the Vercel adapter (@hono/node-server/vercel)
✅ 9 CVEs resolved by this upgrade

This PR will resolve the following CVEs:

Issue Severity           Description
AIKIDO-2026-878106
HIGH
[fast-uri] URI authority parsing fails to treat backslashes as delimiters, allowing different host interpretations compared to Node's WHATWG URL parser, enabling bypass of host allowlists, SSRF filters, and redirect validation checks. The vulnerability permits attackers to circumvent security controls through crafted URIs containing backslashes.
AIKIDO-2026-507986
HIGH
[fast-uri] A security bypass vulnerability exists in host canonicalization for Unicode/IDN values due to inconsistent ASCII/Unicode host handling, which could allow attackers to bypass security checks through improper host normalization.
AIKIDO-2026-10784
HIGH
[fast-uri] A path normalization vulnerability allows attackers to bypass security checks by using percent-encoded slashes and dots that are decoded before dot-segment removal, causing distinct URIs to normalize identically and compare equal.
AIKIDO-2026-10225
HIGH
[mysql2] SQL injection vulnerability in escape functions due to inconsistent type handling, allowing attackers to inject SQL logic and bypass authentication through non-string parameter types in parameterized queries.
AIKIDO-2026-448685
MEDIUM
[mysql2] A vulnerability in compressed packet handling allows attackers to expand small payloads into large buffers without size validation, causing CPU or memory exhaustion through decompression bombs. The issue stems from missing output size limits when inflating zlib-compressed frames.
AIKIDO-2026-10707
MEDIUM
[zod] A prototype pollution vulnerability exists where object schemas with catchall merges treat the literal __proto__ key as a normal property, allowing attackers to modify the prototype chain of validated objects and inject arbitrary inherited properties.
AIKIDO-2026-10706
MEDIUM
[zod] Base64 validator incorrectly accepts strings with whitespace, allowing invalid Base64 inputs to pass validation by being normalized during decoding, weakening strict validation guarantees.
AIKIDO-2026-120510
MEDIUM
[@hono/node-server] Path traversal vulnerability allowing unauthorized access to protected static files on Windows through URL-encoded backslashes, bypassing authorization middleware checks.
AIKIDO-2026-10046
MEDIUM
[pino] Prototype pollution vulnerability in transport loading mechanism via unsafe globalThis.__bundlerPathsOverrides access allows attackers to manipulate the prototype chain and alter application behavior.
🤖 Remediation details

Fix security vulnerabilities in fast-uri, mysql2, zod, @hono/node-server, and pino

Short summary

This PR remediates security vulnerabilities in five packages: fast-uri, mysql2, zod, @hono/node-server, and pino. All five were resolved through a combination of direct dependency bumps in the root package.json, parent-chain bumps that carried transitive fixes, a lockfile-only refresh for fast-uri, and a targeted overrides entry for mysql2 where no parent bump was possible. The package-lock.json was updated throughout via --package-lock-only operations.

fast-uri

fast-uri appeared as a transitive dependency in multiple nested paths, all resolved through ajv@8.20.0 parents whose declared ranges (^3.0.1, ^2.0.0) already permitted the patched versions. A lockfile-only npm update fast-uri --package-lock-only was sufficient to advance all instances: the 3.x copies moved from 3.1.3 to 3.1.4, the 2.x copy moved from 2.4.2 to 2.4.3, and after the fastify v5 parent bump (see pino below) a 4.x instance also resolved at 4.1.1. No manifest edit was required for fast-uri itself.

mysql2

mysql2 is pulled in exclusively by prisma, which exact-pins it at 3.15.3 across every published prisma release including the latest. Because no version of prisma resolves mysql2 to 3.23.1 or higher, a parent bump alone cannot fix this instance. An overrides entry "mysql2@3.15.3": "3.23.1" was added to the root package.json as the only viable path, advancing the resolved version from 3.15.3 to 3.23.1.

zod

zod is a direct dependency in the root package.json. The declared spec was advanced from ^3.22.4 to ^4.4.0, which resolved to 4.4.3 in the lockfile. The openai package declares zod@^3.23.8 as an optional peer; this conflict was handled with --legacy-peer-deps (consistent with how the prior install already treated it), and openai continues to function with the newer zod major.

@hono/node-server

@hono/node-server was a transitive dependency pulled in by @prisma/dev, which is itself a dependency of prisma. Bumping prisma from ^7.8.0 to ^7.9.0 in the root package.json caused prisma@7.9.0 to depend on @prisma/dev@0.24.14, which no longer includes @hono/node-server at all. The vulnerable package was fully removed from the resolved tree as a result. @prisma/client was bumped in parallel from ^7.8.0 to ^7.9.0 to keep the two Prisma packages aligned.

pino

pino is a direct dependency in the root package.json; its spec was advanced from ^9.14.0 to ^10.1.1, resolving to 10.3.1 at the root. However, fastify@4.x also pulls in its own copy of pino and pins it to ^9.0.0, leaving a vulnerable pino@9.14.0 nested under fastify. Fixing that instance required bumping fastify from ^4.26.2 to ^5.6.2 in the root package.json, since fastify@5.x is the first major series that declares pino@^10.1.0. Two @fastify plugins required companion major bumps for v5 compatibility: @fastify/helmet from ^11.1.1 to ^13.1.0 and @fastify/rate-limit from ^9.1.0 to ^11.1.0. After these changes, both the root pino instance and the fastify-nested instance resolve to 10.3.1.

Version changes

Package From To Why updated
pino ^9.14.0 ^10.1.1 (resolves 10.3.1) Direct CVE fix
zod ^3.22.4 (resolves 3.25.76) ^4.4.0 (resolves 4.4.3) Direct CVE fix
prisma ^7.8.0 (resolves 7.8.0) ^7.9.0 (resolves 7.9.0) Parent bump to drop @hono/node-server via @prisma/dev@0.24.14
@prisma/client ^7.8.0 ^7.9.0 Aligned with prisma version bump
fastify ^4.26.2 (resolves 4.29.1) ^5.6.2 (resolves 5.10.0) Parent bump to fix nested pino@9.14.0 (fastify v5 requires pino@^10.1.0)
@fastify/helmet ^11.1.1 ^13.1.0 Required for fastify v5 compatibility (transitive after parent bump)
@fastify/rate-limit ^9.1.0 ^11.1.0 Required for fastify v5 compatibility (transitive after parent bump)
mysql2 3.15.3 3.23.1 CVE fix via override (prisma exact-pins this version; no parent bump available)
fast-uri (3.x instances) 3.1.3 3.1.4 Lockfile refresh; semver range on ajv@8.20.0 parent already permitted fix
fast-uri (2.x instance) 2.4.2 2.4.3 Lockfile refresh; semver range on @fastify/ajv-compiler parent already permitted fix
fast-uri (4.x instance) (not present) 4.1.1 Introduced by fastify v5 upgrade; resolves above patched floor
@hono/node-server 1.19.11 (removed) Dropped from tree after prisma parent bump to 7.9.0

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.

0 participants