swagger-typescript-api is vulnerable to Code Injection
83
High Risk
swagger-typescript-api emits TypeScript enum declarations from OpenAPI specifications and wraps enum string values in double quotes without escaping them. A malicious spec can break out of the enum value string literal and inject a bare-block immediately-invoked function expression. Importing the generated module produced from an attacker-controlled spec executes the injected code at module load with the host process privileges, without any instantiation. The fix escapes enum string values before emitting them.
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