Уязвимость неправильной проверки ввода в компоненте Apache Camel Undertow. Эта проблема затрагивает Apache Camel: с 4.11.0 до 4.14.9, с 4.15.0 до 4.18.4, с 4.19.0 до 4.22.0.
UndertowEndpoint по умолчанию присвоил своему полю headerFilterStrategy базовый HttpHeaderFilterStrategy и поместил этот экземпляр в UndertowHttpBinding, который он создает лениво, перезаписывая UndertowHeaderFilterStrategy, который DefaultUndertowHttpBinding устанавливает в своем собственном конструкторе. Если при развертывании не была предоставлена пользовательская привязка или явный заголовокFilterStrategy, фильтрация, специфичная для отката, никогда не выполнялась на маршрутах, настроенных для конечной точки: объект стратегии был создан и немедленно заменен, прежде чем к нему можно было обратиться.
Следствием является то, что устаревший веб-сокет. Префикс заголовка Exchange не фильтровался на границе транспортного потока в любом направлении, поэтому потребитель HTTP нижнего уровня сопоставлял заголовки входящих проводов этой формы с Exchange, где производитель WebSocket нижнего уровня считывает их как директивы отправки и может быть настроен для доставки партнеру, отличному от выбранного маршрута; и имена заголовков, которые сам Undertow не принимает, были сопоставлены с Exchange, а не пропущены. Остальные потребители DSL никогда не были затронуты, поскольку UndertowComponent явно назначает UndertowRestHeaderFilterStrategy, что расширяет стратегию отката.
Это не регресс CVE-2025-30177: базовый HttpHeaderFilterStrategy сам настраивает входящий фильтр префикса Camel, поэтому защита, введенная этой рекомендацией, продолжала работать через базовый класс и никогда не терялась. Это изменение оставило стратегию отката на пути конечной точки бесхозной, в результате чего в нее были записаны два последующих исправления - одно пропускало имена заголовков при отклонении, другое фильтровало устаревший веб-сокет. префикс в обоих направлениях — применялись к классу, конечная точка которого больше не использовалась, и никогда не вступала в силу в выпусках, в которые они поставлялись. Пользователям рекомендуется выполнить обновление до версии 4.22.0, которая устраняет проблему.
Если пользователи участвуют в потоке выпусков 4.14.x LTS, им предлагается выполнить обновление до 4.14.9. Если пользователи находятся в потоке выпусков 4.18.x, им предлагается выполнить обновление до 4.18.4. Для развертываний, которые не могут обновиться немедленно, настройте стратегию явно, а не полагайтесь на значение по умолчанию, например, привязав UndertowHeaderFilterStrategy в реестре и ссылаясь на него в конечной точке как undertow:http://0.0.0.0:8080/foo?headerFilterStrategy=#myStrategy, а также дополнительно удалите заголовки отправки на границе доверия с помощью RemoveHeaders("websocket.*").
Обратите внимание на остаточное ограничение, которое обновление не устраняет: компонент Undertow намеренно сохраняет веб-сокет. значения как часть видимого извне контракта API, и UndertowProducer считывает их с помощью in.getHeader, который вообще не обращается к HeaderFilterStrategy. Таким образом, восстановленная фильтрация представляет собой глубокоэшелонированную защиту только на границе подводного транспорта. Маршрут, по которому передается ненадежное сообщение от потребителя, не являющегося пользователем, к производителю отката, не защищен этим исправлением и должен сам удалять эти заголовки.
Показать оригинальное описание (EN)
Improper input validation vulnerability in Apache Camel Undertow component. This issue affects Apache Camel: from 4.11.0 before 4.14.9, from 4.15.0 before 4.18.4, from 4.19.0 before 4.22.0. UndertowEndpoint defaulted its headerFilterStrategy field to the base HttpHeaderFilterStrategy and pushed that instance into the UndertowHttpBinding it creates lazily, overwriting the UndertowHeaderFilterStrategy that DefaultUndertowHttpBinding installs in its own constructor. Unless a deployment supplied a custom binding or an explicit headerFilterStrategy, the undertow-specific filtering therefore never executed on endpoint-configured routes: the strategy object was constructed and immediately replaced before it could be consulted. The consequence is that the legacy websocket. Exchange-header prefix was not filtered at the undertow transport boundary in either direction, so an undertow HTTP consumer mapped inbound wire headers of that form onto the Exchange, where an undertow WebSocket producer reads them as dispatch directives and can be made to deliver to a peer other than the one the route selected; and header names that undertow itself does not accept were mapped onto the Exchange rather than being skipped. Rest DSL consumers were never affected, because UndertowComponent assigns UndertowRestHeaderFilterStrategy explicitly, which extends the undertow strategy. This is not a regression of CVE-2025-30177: the base HttpHeaderFilterStrategy configures the inbound Camel-prefix filter itself, so the protection introduced by that advisory continued to work through the base class and was never lost. What the change did was leave the undertow strategy orphaned on the endpoint path, with the effect that two subsequent corrections written into it - one skipping header names undertow rejects, one filtering the legacy websocket. prefix in both directions - were applied to a class the endpoint no longer used and never took effect in the releases that shipped them. Users are recommended to upgrade to version 4.22.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.9. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.4. For deployments that cannot upgrade immediately, configure the strategy explicitly rather than relying on the default, for example by binding an UndertowHeaderFilterStrategy in the registry and referencing it on the endpoint as undertow:http://0.0.0.0:8080/foo?headerFilterStrategy=#myStrategy, and additionally strip the dispatch headers at the trust boundary with removeHeaders(“websocket.*”). Note a residual limitation that upgrading does not remove: the undertow component deliberately keeps the websocket. values as part of its externally visible API contract, and UndertowProducer reads them with in.getHeader, which does not consult a HeaderFilterStrategy at all. The restored filtering is therefore defence in depth at the undertow transport boundary only. A route that carries an untrusted message from a non-undertow consumer into an undertow producer is not protected by this fix and must strip those headers itself.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 3
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Apache Camel
cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:*
|
4.11.0
|
4.14.9
|
|
Apache Camel
cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:*
|
4.15.0
|
4.18.4
|
|
Apache Camel
cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:*
|
4.19.0
|
4.22.0
|