Language: TypeScript
Label: vulnerable
CWE: CWE-918 \u2014 Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

Code:
const loadParserPlugins = async (language: string): Promise<Plugin[] | null> => {
  switch (language as SupportedLanguages) {
    case "javascript":
    case "typescript":
      return [
        await import("prettier/plugins/babel"),
        (await import("prettier/plugins/estree")) as Plugin
      ];
    case "graphql":
      return [await import("prettier/plugins/graphql")];
    case "html":
    case "vue":
      return [await import("prettier/plugins/html")];
    case "markdown":
      return [await import("prettier/plugins/markdown")];
    case "yaml":
    case "json":
      return [await import("prettier/plugins/yaml")];
    case "css":
    case "less":
    case "scss":
      return [await import("prettier/plugins/postcss")];
    default:
      return null;
  }
};