Improper neutralization of input during web page generation in Apache Wicket. org.apache.wicket.extensions.markup.html.basic.SmartLinkLabel and org.apache.wicket.extensions.markup.html.basic.SmartLinkMultiLineLabel display a text value and turn any URL they find in it into a hyperlink. Оба избегают значения модели, а затем передают сбежавший текст в org.apache.wicket.extensions.markup.html.basic.DefaultLinkParser, который ищет в нем что-либо из схемы формы://rest и обворачивает каждое совпадение в якорь, href которого является согласованным текстом, скопированным как он есть. Шаблон принимает любую схему, и нигде на пути нет списка разрешенных схем.
Значение текста, называющее схему, которая выполняет скрипт, становится якорем, который выполняет его, в начале приложения и в собственной сессии читателя, когда читатель нажимает на ссылку. Отображение страницы недостаточно само по себе; ссылка должна быть активирована. Побег не мешает этому и не является проблемой: все символы, необходимые для полезной нагрузки, действительны в URL и являются теми, которые org.apache.wicket.util.string.StringsescapeMarkup() оставляет в покое, и значение заканчивается в URL, а не в тексте элемента, что является контекстом, который не делает данные модели безопасными.
Приложение затрагивается, когда оно отображает текст, полученный через любой из этих двух компонентов. Это то, для чего они существуют: они существуют для связывания адресов электронной почты и веб-URLs, найденных в данных, отображаемых приложением, поэтому ненадежный ввод является целью функции, а не ее неправильное использование, и никакой необычной конфигурации не требуется. Ни один другой компонент не использует этот анализатор, и приложение, которое не использует ни SmartLinkLabel, ни SmartLinkMultiLineLabel, не затрагивается.
На 9.x и 10.x Content-Security-Policy Wicket отправляет по умолчанию скрипт только из источника, несущего nonce для ответа, а URL, схема которого выполняет скрипт, не может его нести, так что политика по умолчанию останавливает работу скрипта. Это свойство политики по умолчанию, а не этих компонентов. Приложение, которое ослабило или отключило свой Content-Security-Policy, по этой или любой другой не связанной причине, затронуто полностью.
Wicket 8.x вообще не имеет поддержки Content-Security-Policy и подвержен влиянию. Эта проблема затрагивает Apache Wicket: от 8.0.0 до 8.19.0, от 9.0.0 до 9.24.0, от 10.0.0 до 10.11.0. Пользователи Apache Wicket 7.x или старше, которые больше не поддерживаются, должны обновиться до поддерживаемой версии.
Пользователям рекомендуется обновиться до версий 8.20.0, 9.25.0 или 10.12.0, которые исправляют проблему.
Показать оригинальное описание (EN)
Improper neutralization of input during web page generation in Apache Wicket. org.apache.wicket.extensions.markup.html.basic.SmartLinkLabel and org.apache.wicket.extensions.markup.html.basic.SmartLinkMultiLineLabel display a text value and turn any URL they find in it into a hyperlink. Both escape the model value and then hand the escaped text to org.apache.wicket.extensions.markup.html.basic.DefaultLinkParser, which searches it for anything of the form scheme://rest and wraps each match in an anchor whose href is the matched text, copied in as it is. The pattern accepts any scheme, and there is no list of permitted schemes anywhere on the path. A text value naming a scheme that executes script therefore becomes an anchor that executes it, in the application's origin and in the reader's own session, when the reader clicks the link. Rendering the page is not enough on its own; the link has to be activated. Escaping does not prevent this and is not the issue: the characters the payload needs are all valid in a URL and are ones that org.apache.wicket.util.string.Strings#escapeMarkup() leaves alone, and the value ends up in a URL rather than in element text, which is a context that escaping model data does not make safe. An application is affected where it renders text it received through either of these two components. That is what they are for: they exist to linkify email addresses and web URLs found in the data an application is displaying, so untrusted input is the purpose of the feature rather than a misuse of it, and no unusual configuration is involved. No other component uses this parser, and an application that uses neither SmartLinkLabel nor SmartLinkMultiLineLabel is not affected. On 9.x and 10.x the Content-Security-Policy Wicket sends by default admits script only from a source carrying a per-response nonce, and a URL whose scheme executes script cannot carry one, so that default policy stops the script from running. This is a property of the default policy and not of these components. An application that has weakened or disabled its Content-Security-Policy, for this or for any unrelated reason, is affected in full. Wicket 8.x has no Content-Security-Policy support at all and is affected as it stands. This issue affects Apache Wicket: from 8.0.0 through 8.19.0, from 9.0.0 through 9.24.0, from 10.0.0 through 10.11.0. Users of Apache Wicket 7.x or older, which are no longer supported, should upgrade to a supported version. Users are recommended to upgrade to version 8.20.0, 9.25.0 or 10.12.0, which fix the issue.
Характеристики атаки
Последствия
Строка CVSS v4.0