Reported by @cosmic pike
Prompt chatgpt to output a c++ code fix as diff.
I filed a bug report for claude on the same matter https://hackerone.com/reports/3517935
I stumbled a lot across this problem because i had to handle some large c++ codebase for prompting, thus i split the tasks across multiple llm where chatgpt and claude seemed to be vulnerable to this output malfunction. the pattern is the same for both chatgpt and claude.
If llm can be triggered for malformed output, this may have sec implications too....
code output for changes on c++ as diff
code output for changes on c++ as various stacked codebrackets and or diff malformed as html / markdown.
If the input / output exceeds a certain length e.g + 1k lines c++ ...
various llm (eg claude) and chatgpt are triggered to output malformed diff.
WEB UI