The vulnerability exists in the print_html function of the Command class in wlc/main.py. This function is responsible for generating HTML output from API data. The root cause of the vulnerability is the lack of HTML escaping when embedding API response data into the HTML output. The provided patch 0f3e58f6d7457b05d48ef40f579a172c4c8b8469 clearly shows the vulnerability and the fix. Before the patch, the print_html function used self.format_output_value to format the data. This function did not perform any HTML escaping, making it possible for an attacker to inject malicious HTML and JavaScript code. The patch introduces a new function, format_html_value, which uses the html.escape function to properly escape the data before it is rendered. The print_html function is then updated to use this new, secure function. The presence of new test cases in wlc/test_main.py that specifically test for this XSS vulnerability further confirms the issue and the effectiveness of the patch. Therefore, any user of wlc who uses the HTML output format with untrusted data is at risk. The vulnerable function is wlc.main.Command.print_html.