swagger-typescript-api is vulnerable to Code Injection
83
High Risk
swagger-typescript-api interpolates the OpenAPI servers[0].url value raw into the string literal of its generated fetch HTTP client template without escaping it. A malicious specification can break out of the string literal and inject TypeScript that runs as a static class field initializer. Simply importing the generated module produced from an attacker-controlled spec executes the injected code with the host process privileges, without any instantiation or method call. The fix escapes the base URL once at the source before template rendering.
You are affected if you are using a version that falls within the vulnerable range.
swagger-typescript-api is vulnerable to Code Injection in versions 0.0.1 - 13.12.1.
Upgrade the swagger-typescript-api library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant