Description
Hey API is an ecosystem for turning API specifications into production-ready code. Prior to 0.97.3, dist/clients/core/params.ts ships a runtime template copied into generated SDKs as params.gen.ts, and buildClientParams writes unknown slot-prefixed keys such as $body_, $headers_, $path_, and $query_ directly to the corresponding slot, allowing $query___proto__ alongside a legitimate q field to set params.query through params["query"]["__proto__"] = value, call Object.setPrototypeOf(params.query, value), and expose inherited attacker-controlled keys during for..in iteration. This issue is fixed in version 0.97.3.
Published: 2026-07-17
Score: 4.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is in the buildClientParams function of the Hey API openapi‑ts package, which copies a runtime template into generated SDKs. The function writes keys prefixed with a slot marker ($body_, $headers_, $path_, or $query_) directly into the corresponding slot. Because any key is accepted, an attacker can supply a key such as $query___proto__ to assign the __proto__ property of the params.query object. This prototype chain manipulation is classified as CWE‑1321 and allows the attacker to inject properties that become inherited by the object, which can be exposed during for…in loops and may leak data or alter control flow.

Affected Systems

The affected component is the Hey API openapi‑ts library, part of the Hey API ecosystem. All releases before version 0.97.3 contain the flaw; version 0.97.3 and newer are fixed.

Risk and Exploitability

The CVSS score of 4.8 indicates moderate severity, and the EPSS score is below 1 %, suggesting a low probability of exploitation at this time. The vulnerability is not listed in the CISA KEV catalog. An attacker would need to supply a crafted key to the buildClientParams routine, which occurs when user input is processed by a generated SDK to construct request parameters. If the SDK is exposed to untrusted data, the injected prototype chain could leak data or alter program behavior, but the attack requires crafted input and is therefore unlikely to be exploited remotely without an exposed interface.

Generated by OpenCVE AI on July 30, 2026 at 23:37 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Hey API openapi‑ts package to version 0.97.3 or later, where the buildClientParams function has been fixed to reject keys containing the triple underscore sequence before __proto__.
  • If upgrading is not immediately possible, modify the SDK configuration or the generated client code to sanitize or strip any $<slot>___proto__ keys before passing them to buildClientParams.
  • Review any custom code that builds or manipulates params objects in the SDK and ensure that for…in loops check hasOwnProperty or use Object.entries to prevent inherited property processing.

Generated by OpenCVE AI on July 30, 2026 at 23:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hhx9-57xq-r5rw @hey-api/openapi-ts's `buildClientParams` template: prototype chain substitution via unknown `$<slot>___proto__` key
History

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Hey-api
Hey-api openapi-ts
Vendors & Products Hey-api
Hey-api openapi-ts

Mon, 20 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 17 Jul 2026 20:00:00 +0000

Type Values Removed Values Added
Description Hey API is an ecosystem for turning API specifications into production-ready code. Prior to 0.97.3, dist/clients/core/params.ts ships a runtime template copied into generated SDKs as params.gen.ts, and buildClientParams writes unknown slot-prefixed keys such as $body_, $headers_, $path_, and $query_ directly to the corresponding slot, allowing $query___proto__ alongside a legitimate q field to set params.query through params["query"]["__proto__"] = value, call Object.setPrototypeOf(params.query, value), and expose inherited attacker-controlled keys during for..in iteration. This issue is fixed in version 0.97.3.
Title Hey API: `buildClientParams` template: prototype chain substitution via unknown `$<slot>___proto__` key
Weaknesses CWE-1321
References
Metrics cvssV3_1

{'score': 4.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N'}


Subscriptions

Hey-api Openapi-ts
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-20T16:24:20.624Z

Reserved: 2026-05-22T20:57:10.976Z

Link: CVE-2026-48819

cve-icon Vulnrichment

Updated: 2026-07-20T16:23:41.237Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T23:45:05Z

Weaknesses
  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')