chore(deps): update dependency @hey-api/openapi-ts to ^0.99.0 [security] - #871
Open
renovate[bot] wants to merge 2 commits into
Open
chore(deps): update dependency @hey-api/openapi-ts to ^0.99.0 [security]#871renovate[bot] wants to merge 2 commits into
renovate[bot] wants to merge 2 commits into
Conversation
Contributor
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
Contributor
Coverage Report for packages/configs/vitest-config
File CoverageNo changed files found. |
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.
This PR contains the following updates:
^0.93.0→^0.99.0@hey-api/openapi-ts's
buildClientParamstemplate: prototype chain substitution via unknown$<slot>___proto__keyCVE-2026-48819 / GHSA-hhx9-57xq-r5rw
More information
Details
Summary
dist/clients/core/params.tsin@hey-api/openapi-tsships a runtime template that is copied verbatim into every generated SDK asparams.gen.ts. When a caller passes an object argument containing an unknown key starting with a slot prefix ($body_,$headers_,$path_,$query_), the function strips the prefix and writes the remainder directly to that slot without validation. The key"$query___proto__"causes the returnedparams.queryobject to have its prototype chain substituted with attacker-controlled data. The issue is present in all versions through at least0.97.2.Details
The vulnerable branch in
dist/clients/core/params.ts:This branch runs for any key that (1) is not registered in the field map and (2) starts with one of the four slot prefixes. When a caller passes
"$query___proto__"as an extra key alongside a legitimate field, the key is not in the field map,key.startsWith("$query_")is true, andkey.slice(7)produces"__proto__". The bracket-writeparams["query"]["__proto__"] = valueinvokes the__proto__setter, which callsObject.setPrototypeOf(params.query, value).Reachability. Every generated endpoint method that accepts an object argument passes it through
buildClientParams. If the application forwards user-supplied request parameters to a generated client method — a common pattern in proxy servers, BFF layers, and API gateways — an attacker can include"$query___proto__"alongside a legitimate field (e.g."q"). The legitimate field ensuresstripEmptySlotsdoes not remove the affected slot (it has at least one own key), so the poisonedparams.queryobject is returned to the caller.Concrete field config that hey-api generates for a GET endpoint with one query param
q:A request
{ q: "hello", "$query___proto__": { isAdmin: true } }reaches this call with"q"going to the field map branch and"$query___proto__"falling through toextraPrefixes.PoC
npm install @hey-api/openapi-ts@0.97.2 cp node_modules/@hey-api/openapi-ts/dist/clients/core/params.ts ./params.ts npx tsx poc.ts ##### or: docker build -t heyapi-poc . && docker run --rm heyapi-pocpoc.ts:Expected output:
No sentinel key is needed. The legitimate field
"q"keepsparams.queryalive throughstripEmptySlots.reproduce.zip
Impact
The returned
params.queryobject has its prototype chain substituted with the attacker-supplied value. Any downstream code that iterates it withfor..in(e.g., when serializing query parameters for an outgoing HTTP request) will enumerate the injected keys alongside legitimate ones. Applications that check inherited properties on the params object for routing or authorization decisions are also affected.Global
Object.prototypeis not modified — impact is limited to the returned slot object and its consumers.Every npm package generated by
@hey-api/openapi-tscarries this template. Downstream packages include@opencode-ai/sdk,@trigger.dev/sdk, and others. A fix in the template propagates to all of them on regeneration.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
hey-api/hey-api (@hey-api/openapi-ts)
v0.99.0Compare Source
Minor Changes
.symbolsto.imports(#4052) (57fac5e) by @mrlubosTo better represent its functionality, the
plugin.symbolsproperty has been renamed toplugin.imports.089ed2e) by @mrlubosPlugin duplicates behavior
If you specified the same plugin multiple times, only the last instance would be used. We eventually added a warning for this behavior, but that didn't treat the root issue. This release changes that by merging duplicate plugin configurations.
BREAKING plugin(@hey-api/schemas): widen
schematype innameBuilderto unknown (#4076) (98ce35e) by @mrlubosBREAKING plugin: remove
.external()method (#4052) (57fac5e) by @mrlubosRemoved
plugin.external()functionThis function was used to reference external symbols. All plugins now use the Imports API, which allows you to reference external symbols in a type-safe way through
plugin.imports.Patch Changes
api: replace
~fields with$(#4086) (d5ca286) by @mrlubosconfig: add Presets API (
3b4ee7a) by @mrlubosplugin(@hey-api/client-angular): fix: send an empty object request body when explicitly provided in flat parameters mode (#4070) (
ab522ef) by @matthewjamesadamclient: use
getBaseUrl()function to determine default value (#3772) (4026955) by @mrlubosplugin(zod): improve discriminator handling (
680b947) by @mrlubosplugin(@tanstack/preact-query): fix: strip
initialDatafrom the inferred result types for infinite query options (7a4b0cf) by @mrlubosplugin(@tanstack/solid-query): fix: strip
initialDatafrom the inferred result types for infinite query options (7a4b0cf) by @mrlubosplugin(valibot): support custom regular expression error messages with
x-pattern-message(#4117) (3ed3afb) by @pullfrogplugin(@hey-api/client-next): fix: send an empty object request body when explicitly provided in flat parameters mode (#4070) (
f6d4512) by @matthewjamesadamplugin(@hey-api/client-axios): fix: send an empty object request body when explicitly provided in flat parameters mode (#4070) (
f6d4512) by @matthewjamesadamplugin(zod): support creating optional request schemas (
11315c7) by @mrlubosplugin(@tanstack/react-query): fix: strip
initialDatafrom the inferred result types for infinite query options (7a4b0cf) by @mrlubosplugin(@hey-api/client-ky): fix: send an empty object request body when explicitly provided in flat parameters mode (#4070) (
f6d4512) by @matthewjamesadamplugin(valibot): support creating optional request schemas (
11315c7) by @mrlubosexports: add
/pluginsexported module (#4076) (93129b7) by @mrlubosplugin(@tanstack/svelte-query): fix: strip
initialDatafrom the inferred result types for infinite query options (7a4b0cf) by @mrlubosplugin(@hey-api/client-nuxt): fix: send an empty object request body when explicitly provided in flat parameters mode (#4070) (
f6d4512) by @matthewjamesadamplugin(zod): support custom regular expression error messages with
x-pattern-message(#4117) (3ed3afb) by @pullfrogplugin(@tanstack/angular-query-experimental): fix: strip
initialDatafrom the inferred result types for infinite query options (7a4b0cf) by @mrlubosplugin(@hey-api/client-ofetch): fix: send an empty object request body when explicitly provided in flat parameters mode (#4070) (
f6d4512) by @matthewjamesadamplugin(@hey-api/client-fetch): fix: send an empty object request body when explicitly provided in flat parameters mode (#4070) (
f6d4512) by @matthewjamesadamplugin(@hey-api/typescript): improve discriminator handling (
680b947) by @mrlubosplugin(orpc): make
.input()optional if all layers are optional (11315c7) by @mrlubos*parser: fix: delete unresolvable
$refkeywords (#4087) (6c21d81) by @pullfrogplugin(@tanstack/vue-query): fix: strip
initialDatafrom the inferred result types for infinite query options (8d91bd5) by @magicismightplugin(valibot): improve discriminator handling (
680b947) by @mrlubosexports: export
pluginstype helpers (#4076) (93129b7) by @mrlubosUpdated Dependencies:
v0.98.2Compare Source
Patch Changes
plugin(@hey-api/client-ofetch): export augmentable
ClientMetainterface (#3996) (f02246b) by @matthewjamesadamplugin(@hey-api/sdk): fix: don't expose SSE errors as iterator return types (#3989) (
ffbd82e) by @frastefaniniplugin(@hey-api/client-next): export augmentable
ClientMetainterface (#3996) (f02246b) by @matthewjamesadamplugin(@hey-api/client-ky): export augmentable
ClientMetainterface (#3996) (f02246b) by @matthewjamesadamplugin(@hey-api/client-fetch): export augmentable
ClientMetainterface (#3996) (f02246b) by @matthewjamesadamplugin(@hey-api/client-nuxt): export augmentable
ClientMetainterface (#3996) (f02246b) by @matthewjamesadamplugin(@hey-api/client-angular): fix: reassign the result of
HttpHeaders.delete()back toopts.headers(#3988) (b9390d7) by @joshkaplinskyplugin(@hey-api/client-angular): export augmentable
ClientMetainterface (#3996) (f02246b) by @matthewjamesadamplugin(@hey-api/client-axios): export augmentable
ClientMetainterface (#3996) (f02246b) by @matthewjamesadamplugin(@hey-api/sdk): support type-safe
metaoption via augmentableClientMetainterface (#3996) (b7ee3fd) by @matthewjamesadamUpdated Dependencies:
v0.98.1Compare Source
Patch Changes
cli: simplify generate command messages (#3982) (
11f9324) by @mrlubosplugin(valibot): fix: revert referencing TypeScript enums (#3982) (
11f9324) by @mrlubosplugin(zod): fix: revert referencing TypeScript enums (#3982) (
11f9324) by @mrlubosUpdated Dependencies:
v0.98.0Compare Source
Minor Changes
9b79a56) by @mrlubosThis is an internal change that simplifies the configuration and plugin APIs. The generated output should be unaffected, please open an issue if that's not the case. If you have custom plugins, refer to the custom plugin guide for the latest instructions.
Patch Changes
parser: fix: preserve sort order when filtering input (#3953) (
f6e8496) by @pullfrogplugin(valibot): fix: improve boolean enum handling (#3974) (
d3e9f13) by @mrlubosplugin(@hey-api/client-ky): fix: use
Object.create()to avoid prototype chain substitution. Reported by @programsurf, @daeungdaeung, @yoonsh, and @lubroai (GHSA-hhx9-57xq-r5rw) (#3973) (9f2f0d2) by @mrlubosplugin(@hey-api/client-ofetch): fix: use
Object.create()to avoid prototype chain substitution. Reported by @programsurf, @daeungdaeung, @yoonsh, and @lubroai (GHSA-hhx9-57xq-r5rw) (#3973) (9f2f0d2) by @mrlubosplugin(@hey-api/client-axios): add explicit return types (#3880) (
9c78271) by @tompuricplugin(@hey-api/client-axios): fix: use
Object.create()to avoid prototype chain substitution. Reported by @programsurf, @daeungdaeung, @yoonsh, and @lubroai (GHSA-hhx9-57xq-r5rw) (#3973) (9f2f0d2) by @mrlubosplugin(@hey-api/client-next): fix: improve params helper type (#3946) (
bebb225) by @pullfrogplugin(@hey-api/client-fetch): fix: use
Object.create()to avoid prototype chain substitution. Reported by @programsurf, @daeungdaeung, @yoonsh, and @lubroai (GHSA-hhx9-57xq-r5rw) (#3973) (9f2f0d2) by @mrlubosplugin(@hey-api/client-ofetch): fix: improve params helper type (#3946) (
bebb225) by @pullfrogplugin(@hey-api/client-nuxt): add explicit return types (#3880) (
9c78271) by @tompuricdsl: track extended class symbols (#3945) (
13c3d7d) by @mrlubosplugin(@hey-api/client-angular): fix: use
Object.create()to avoid prototype chain substitution. Reported by @programsurf, @daeungdaeung, @yoonsh, and @lubroai (GHSA-hhx9-57xq-r5rw) (#3973) (9f2f0d2) by @mrlubosplugin(orpc): fix: handle no-content success responses (#3948) (
44672f0) by @lyzno1plugin(@hey-api/sdk): add explicit return types (#3880) (
9c78271) by @tompuricplugin(@hey-api/client-nuxt): fix: use
Object.create()to avoid prototype chain substitution. Reported by @programsurf, @daeungdaeung, @yoonsh, and @lubroai (GHSA-hhx9-57xq-r5rw) (#3973) (9f2f0d2) by @mrlubosplugin(@hey-api/client-ky): fix: improve params helper type (#3946) (
bebb225) by @pullfrogplugin(@hey-api/client-angular): add explicit return types (#3880) (
9c78271) by @tompuricplugin(@hey-api/client-nuxt): fix: improve params helper type (#3946) (
bebb225) by @pullfrogplugin(@hey-api/client-angular): fix: improve params helper type (#3946) (
bebb225) by @pullfrogplugin(@hey-api/sdk): fix: expose
keyon security schemes when their signatures collide (#3935) (23d908a) by @matthewjamesadamplugin(@hey-api/client-fetch): fix: improve params helper type (#3946) (
bebb225) by @pullfrogplugin(@hey-api/client-ky): add explicit return types (#3880) (
9c78271) by @tompuricplugin(@hey-api/client-axios): fix: improve params helper type (#3946) (
bebb225) by @pullfrogplugin(@hey-api/client-fetch): add explicit return types (#3880) (
9c78271) by @tompuricplugin(@hey-api/client-next): fix: use
Object.create()to avoid prototype chain substitution. Reported by @programsurf, @daeungdaeung, @yoonsh, and @lubroai (GHSA-hhx9-57xq-r5rw) (#3973) (9f2f0d2) by @mrlubosplugin(@hey-api/client-ofetch): add explicit return types (#3880) (
9c78271) by @tompuricplugin(@hey-api/client-next): add explicit return types (#3880) (
9c78271) by @tompuricUpdated Dependencies:
v0.97.3Patch Changes
plugin(@hey-api/client-axios): fix: correct return type in SSE (#3919) (
a19b3a4) by @kitlangtonplugin(@tanstack/preact-query): add
getQueryDataoption (#3827) (1aa4785) by @inas-sirhanplugin(@hey-api/client-ofetch): fix: correct return type in SSE (#3919) (
a19b3a4) by @kitlangtonplugin(@tanstack/svelte-query): add
getQueryDataoption (#3827) (1aa4785) by @inas-sirhanplugin(@tanstack/angular-query-experimental): add
getQueryDataoption (#3827) (1aa4785) by @inas-sirhanplugin(@tanstack/react-query): add
getQueryDataoption (#3827) (1aa4785) by @inas-sirhanplugin(@hey-api/client-fetch): fix: correct return type in SSE (#3919) (
a19b3a4) by @kitlangtonplugin(@tanstack/react-query): add
useGetQueryDataoption (#3827) (1aa4785) by @inas-sirhanplugin(@hey-api/client-ky): fix: correct return type in SSE (#3919) (
a19b3a4) by @kitlangtonplugin(@tanstack/solid-query): add
getQueryDataoption (#3827) (1aa4785) by @inas-sirhanplugin(@hey-api/client-next): fix: correct return type in SSE (#3919) (
a19b3a4) by @kitlangtonplugin(@tanstack/preact-query): add
useGetQueryDataoption (#3827) (1aa4785) by @inas-sirhanplugin(@hey-api/client-angular): fix: correct return type in SSE (#3919) (
58962a0) by @kitlangtonplugin(@hey-api/transformers): add support for Temporal API via temporal-polyfill in
dates(#3916) (bfa457a) by @OptoCloudplugin(@tanstack/vue-query): add
getQueryDataoption (#3827) (1aa4785) by @inas-sirhanplugin(zod): fix: avoid invalid
.extend()onz.record()when a discriminated union member is an empty object (#3915) (8fa9f3a) by @pullfrogUpdated Dependencies:
v0.97.2Patch Changes
plugin(zod): use enums from TypeScript if available (#3884) (
abc8ceb) by @mrlubosplugin(@hey-api/client-next): fix: preserve query auth when when there are no other query parameters (#3853) (
a6ee7eb) by @copilot-swe-agentplugin(@hey-api/sdk): support
valibotas response transformer (#3847) (6770f78) by @SukkaWplugin(@tanstack/vue-query): add
mutationKeysoption (#3858) (d86680a) by @slmnshplugin(@hey-api/client-nuxt): fix: preserve query auth when when there are no other query parameters (#3853) (
a6ee7eb) by @copilot-swe-agentplugin(@tanstack/svelte-query): add
mutationKeysoption (#3858) (d86680a) by @slmnshplugin(@hey-api/sdk): support
zodas response transformer (#3847) (6770f78) by @SukkaWplugin(@hey-api/client-angular): fix: preserve query auth when when there are no other query parameters (#3853) (
a6ee7eb) by @copilot-swe-agentplugin(@hey-api/client-fetch): fix: preserve query auth when when there are no other query parameters (#3853) (
a6ee7eb) by @copilot-swe-agentplugin(@hey-api/client-axios): fix: preserve query auth when when there are no other query parameters (#3853) (
a6ee7eb) by @copilot-swe-agentplugin(valibot): use enums from TypeScript if available (#3884) (
abc8ceb) by @mrlubosplugin(@tanstack/react-query): add
mutationKeysoption (#3858) (d86680a) by @slmnshplugin(@tanstack/solid-query): add
mutationKeysoption (#3858) (d86680a) by @slmnshplugin(@hey-api/client-ofetch): fix: preserve query auth when when there are no other query parameters (#3853) (
a6ee7eb) by @copilot-swe-agentplugin(@hey-api/client-ky): fix: preserve query auth when when there are no other query parameters (#3853) (
a6ee7eb) by @copilot-swe-agentplugin(@tanstack/preact-query): add
mutationKeysoption (#3858) (d86680a) by @slmnshdsl: fix: cache lazy node result (#3855) (
7dee3c2) by @awdr74100plugin(@tanstack/angular-query-experimental): add
mutationKeysoption (#3858) (d86680a) by @slmnshUpdated Dependencies:
v0.97.1Patch Changes
additionalPropertieskey variables (#3841) (d880caa) by @pullfrogUpdated Dependencies:
v0.97.0Minor Changes
BREAKING plugin(@hey-api/client-ky): fix: pass previous result to error interceptors (#3814) (
0d388de) by @SukkaWBREAKING client: resolve
runtimeConfigPathrelative to the output folder (#3770) (296da55) by @inas-sirhanChanged
runtimeConfigPathbehaviorThis was a known, long-standing issue confusing first-time users. Before, defining client
runtimeConfigPathvalue would paste it verbatim to the generated output. This release changes the behavior to resolve relative to the current working directory the same way output path works.BREAKING plugin(@hey-api/client-angular):
requestandresponseobjects might be undefined (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-angular): fix: respect
throwOnErrorwhen request validation fails (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-next):
requestandresponseobjects might be undefined (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-fetch): fix: pass previous result to error interceptors (#3814) (
0d388de) by @SukkaWBREAKING plugin(@hey-api/client-ky):
requestandresponseobjects might be undefined (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-fetch):
requestandresponseobjects might be undefined (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-ofetch):
requestandresponseobjects might be undefined (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-ky): fix: respect
throwOnErrorwhen request validation fails (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-fetch): fix: respect
throwOnErrorwhen request validation fails (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-next): fix: pass previous result to error interceptors (#3814) (
0d388de) by @SukkaWBREAKING plugin(@hey-api/client-ky): respect ky instance defaults (#3806) (
d16cf1c) by @SukkaWChanged Ky client behavior
The Ky client was updated to be more intuitive. Some Ky options now need to be passed via the
kyOptionsfield and you need to passundefinedto unset an option.BREAKING plugin(@hey-api/client-ofetch): fix: respect
throwOnErrorwhen request validation fails (#3814) (0d388de) by @SukkaWBREAKING plugin(@hey-api/client-next): fix: respect
throwOnErrorwhen requConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.