NPM · JULY 2026 · EARLY WARNING

swagger-typescript-api npm Package Code Injection Vulnerability

EARLY WARNING · UNCONFIRMED. This page describes a developing threat that 0Day surfaced from early signals and has not yet independently confirmed. Details may change. Always verify against the primary sources before acting.
GHSA-38C3-WV3C-V3XJSeverity: HIGH

The swagger-typescript-api npm package is under investigation for a potential code injection vulnerability due to an unescaped URL in the axios http-client template.

What happened

An early warning has been issued regarding a potential code injection vulnerability in the swagger-typescript-api npm package. The issue reportedly arises from the interpolation of an unescaped URL directly into a TypeScript string literal, which could allow an attacker to execute arbitrary code with the importing process's privileges. This vulnerability appears to affect all versions of the package up to and including 13.12.2. The recommended action is to upgrade to a version where the `apiConfig.baseUrl` is sanitized or to apply a custom fix to sanitize the `apiConfig.baseUrl` in `src/code-gen-process.ts`. For more details, consult the primary sources.

How 0Day mitigates this

MATCHED TO YOUR ACTUAL DEPENDENCY GRAPH0Day matches every incoming threat signal against your GitHub organization’s full dependency graph, including transitive dependencies. If swagger-typescript-api is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.

Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.

Join the 0Day waitlist →

← Back to all threats