Junglewise Threat Intelligence

CVE-2026-54660: acacode swagger-typescript-api credential exfiltration via remote $ref resolution

CVE-2026-54660 · Severity: high · CVSS 7.4 · Published 2026-07-29

Technologies: swagger-typescript-api (npm). Vendors: npm.

Executive brief

swagger-typescript-api is a tool used by developers to automatically generate code for interacting with web services. A security flaw allows a malicious API specification file to trick the tool into sending the developer's private authentication tokens (such as GitHub or corporate login tokens) to an attacker-controlled server. This could lead to the theft of sensitive credentials used in development or automated build environments.

Technical details

The vulnerability exists in the remote schema resolution logic within `src/resolved-swagger-schema.ts`. When the `--authorizationToken` flag is used, the `getRemoteRequestHeaders` function attaches the token to every HTTP request made by `fetchRemoteSchemaDocument`. Because `warmUpRemoteSchemasCache` resolves external `$ref` URLs without performing same-origin checks, an attacker can craft an OpenAPI specification that includes a reference to an external, attacker-controlled domain. When a developer or CI/CD pipeline processes this malicious spec, the bearer token is exfiltrated to the attacker's server. This issue is fixed in version 13.12.2 by enforcing same-origin checks for token forwarding.

Affected products

  • acacode swagger-typescript-api < 13.12.2

Timeline

  • 2026-06-08: patched: Fixed in version 13.12.2
  • 2026-07-29: disclosed: CVE-2026-54660 published

References

Related threats