HTML сообщает, что plist-to-html, CodeChecker parse -- export html и CodeChecker cmd diff -- output html генерируют сообщение отчета, имя чекера и путь к исходному файлу в блок сценария через json.dumps. json.dumps, поэтому закрывающий тег сценария в любом из этих трех полей заканчивает элемент сценария, и далее анализируется как HTML. Автором ввода является тот, кто контролирует проанализированное дерево или сторонний файл результатов, который принимает отчет-конвертер, или кто удерживает PRODUCT_STORE в потоке различий cmd. Зритель — это кто-то другой: docs/jenkins_gerrit_integration.md документирует написание отчета в Jenkins userContent и размещает свой URL в обзоре Gerrit.
Одним из предостережений, заслуживающих внимания, является то, что Jenkins обслуживает userContent под ограничительным CSP, который блокирует встроенный обработчик, так что пункт назначения, вероятно, безопасен, как настроено. Сгенерированный отчет не устанавливает свой собственный CSP, поэтому удар попадает туда, где он публикуется без него.
Показать оригинальное описание (EN)
The HTML report that plist-to-html, CodeChecker parse --export html and CodeChecker cmd diff --output html generate puts the report message, the checker name and the source file path into a script block through json.dumps. json.dumps does not escape the less-than character, so a closing script tag in any of those three fields ends the script element and what follows is parsed as HTML. The input author is whoever controls the analysed tree or a third-party result file that report-converter ingests, or who holds PRODUCT_STORE in the cmd diff flow. The viewer is somebody else: docs/jenkins_gerrit_integration.md documents writing the report into Jenkins userContent and posting its URL into a Gerrit review. One caveat worth stating up front is that Jenkins serves userContent under a restrictive CSP that would block an inline handler, so that destination is probably safe as configured. The generated report sets no CSP of its own, so the impact lands wherever it is published without one.
Характеристики атаки
Последствия
Строка CVSS v4.0