I could've done better with research, but this post has been collecting dust in the drafts, so I decided to try my first (and last) time to finish the work I started a few months ago.
Thanks @GICodeWarrior for taking time commenting on the article. Shamefully, I can already imagine a scenario on how the attack could be carried out.
Fortunately, the vulnerability can be corrected by introducing escapejs template filter. Big thanks to @gynvael.
Encoding for each scenario can be quite complex unfortunately. Django does have some template filters to help.
I recommend following the documentation carefully, and using a JSON API or other similarly standard mechanism if the documented options are insufficient.
I had an opportunity to work for Outlier as an AI trainer/reviewer, the point was to beat the AI models. The role doesn't relate to SWE duties, but it was a good money. Like someone swimming in the ocean when he finds a small tiny isle and takes a break for next miles.
reply