Description
swagger-typescript-api generates API clients for Fetch or Axios from OpenAPI specifications. Prior to 13.12.2, src/resolved-swagger-schema.ts getRemoteRequestHeaders forwards --authorizationToken to every URL fetched by fetchRemoteSchemaDocument while warmUpRemoteSchemasCache resolves external $ref URLs, allowing an attacker-controlled OpenAPI spec to exfiltrate the developer or CI bearer token to a cross-origin endpoint. This issue is fixed in version 13.12.2.
Published: 2026-07-29
Score: 7.4 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A flaw in the swagger-typescript-api library allows an attacker to supply a malicious OpenAPI specification that causes the generator to forward the developer or CI bearer token to every external $ref URL it retrieves. The vulnerability is rooted in the getRemoteRequestHeaders function, which propagates the "--authorizationToken" flag during schema warm‑up. The leak of authentication credentials falls under information disclosure (CWE‑200, CWE‑201, CWE‑522) and is amplified by insecure cross‑domain reference resolution (CWE‑918). The documentation states that the token can be exfiltrated to a cross‑origin endpoint; it is inferred that an attacker who obtains the token could subsequently use it to call protected APIs or services on behalf of the user.

Affected Systems

The library is provided by acacode as the swagger‑typescript‑api package, which generates Fetch or Axios clients from OpenAPI specifications. Versions older than v13.12.2 are affected; the issue was fixed in release v13.12.2 and later.

Risk and Exploitability

The CVSS score of 7.4 classifies the vulnerability as high severity, but the EPSS score of less than 1% indicates a low likelihood of exploitation as of now. The flaw is not listed in CISA’s KEV catalog. Exploitability requires the runtime that uses swagger‑typescript‑api to load a malicious specification, which is inferred to typically occur in a compromised CI/CD pipeline or on a local development machine that accepts untrusted specs. In such scenarios, the bearer token is unintentionally sent to an attacker‑controlled endpoint via the external $ref resolution flow, exposing credentials and potentially enabling further action.

Generated by OpenCVE AI on August 3, 2026 at 13:19 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade swagger‑typescript‑api to v13.12.2 or newer, which removes the forwarding of the authorization token during $ref resolution.
  • When an upgrade cannot be performed immediately, run the generator without the "--authorizationToken" flag or avoid providing the flag when processing untrusted specifications.
  • Limit external $ref access to trusted domains by downloading specifications locally, using a proxy whitelist, or validating the spec before feeding it to the library.

Generated by OpenCVE AI on August 3, 2026 at 13:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-h754-fxp7-88wx swagger-typescript-api vulnerable to authorization-token exfiltration via spec `$ref`
History

Thu, 30 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
First Time appeared Acacode
Acacode swagger-typescript-api
Vendors & Products Acacode
Acacode swagger-typescript-api
Metrics ssvc

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


Wed, 29 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Description swagger-typescript-api generates API clients for Fetch or Axios from OpenAPI specifications. Prior to 13.12.2, src/resolved-swagger-schema.ts getRemoteRequestHeaders forwards --authorizationToken to every URL fetched by fetchRemoteSchemaDocument while warmUpRemoteSchemasCache resolves external $ref URLs, allowing an attacker-controlled OpenAPI spec to exfiltrate the developer or CI bearer token to a cross-origin endpoint. This issue is fixed in version 13.12.2.
Title swagger-typescript-api vulnerable to authorization-token exfiltration via spec `$ref`
Weaknesses CWE-200
CWE-201
CWE-522
CWE-918
References
Metrics cvssV3_1

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


Subscriptions

Acacode Swagger-typescript-api
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-30T13:43:08.019Z

Reserved: 2026-06-15T20:16:46.199Z

Link: CVE-2026-54660

cve-icon Vulnrichment

Updated: 2026-07-30T13:42:58.448Z

cve-icon NVD

Status : Deferred

Published: 2026-07-29T15:16:25.300

Modified: 2026-07-30T19:23:45.880

Link: CVE-2026-54660

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T13:30:04Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-201

    Insertion of Sensitive Information Into Sent Data

  • CWE-522

    Insufficiently Protected Credentials

  • CWE-918

    Server-Side Request Forgery (SSRF)