CVE-2026-54661 swagger-typescript-api vulnerable to code injection via unescaped `servers[0].url` in axios http-client template

High 8.3 Published Updated

Attackers can inject code into generated Axios clients via malicious OpenAPI specs, leading to execution during client instantiation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-54661?

CVE-2026-54661 is a high-severity code injection vulnerability in acacode swagger-typescript-api, published on 29 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

swagger-typescript-api generates API clients for Fetch or Axios from an OpenAPI Specification. Prior to 13.12.2, templates/base/http-clients/axios-http-client.ejs interpolates servers[0].url from src/code-gen-process.ts into the HttpClient constructor without escaping, allowing an attacker-controlled OpenAPI spec to inject code that executes when new HttpClient() or new Api() is constructed. This issue is fixed in version 13.12.2.

Weakness: CWE-94, CWE-74, CWE-1336

Which versions are affected by CVE-2026-54661?

2 open source packages ship an affected version, including swagger-typescript-api.

PackageAffectedFixed in
swagger-typescript-api npmAll versions13.12.2
swagger-typescript-api npmAll versions13.12.2

How do I fix CVE-2026-54661?

Upgrade swagger-typescript-api to 13.12.2 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-54661 being exploited?

There is no known exploitation of CVE-2026-54661 in the wild and no public exploit code.

Sources

Also known as GHSA-38c3-wv3c-v3xj.

Is CVE-2026-54661 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free