The vulnerability lies in the comment function within cli/src/render/common/comment.ts. This function is responsible for generating JSDoc comments from a GraphQL schema's descriptions and deprecation reasons. The patch 2dbc80ffb767ee58e6b27d9d81d58fa1ee8bea28 introduces a new function, escapeCommentClose, which escapes the */ character sequence. This sequence, if present in the schema's text, could be used to prematurely close a comment block and inject arbitrary code into the generated TypeScript file. The comment function was modified to use escapeCommentClose on both the comment.text and comment.deprecated inputs, which directly mitigates the vulnerability. Therefore, the comment function is the vulnerable function as it was the one processing the malicious input and allowing for code injection.