🇰🇷 한글 설명
Apache Camel의 Atmosphere Websocket 컴포넌트에서 부적절한 입력 검증으로 인해 발생하는 SSRF 및 민감 정보 노출 취약점입니다. 공격자가 WebSocket 쿼리 파라미터를 통해 Camel 내부 제어 헤더를 주입하면, 서버 측 HTTP 요청을 임의의 목적지로 리다이렉트하거나 환경 변수 및 Vault 비밀번호와 같은 민감한 정보를 탈취할 수 있습니다.
💡 쉬운 설명
웹소켓을 통해 접속할 때 특수한 명령어를 섞어 보내면, 서버가 공격자가 원하는 곳으로 몰래 접속하게 만들거나 서버 내부의 중요한 비밀번호를 빼낼 수 있는 문제입니다. 이를 통해 서버의 내부 네트워크나 설정 정보가 위험에 처할 수 있습니다.
🇺🇸 원문 (English)
Improper Input Validation, Exposure of Sensitive Information to an Unauthorized Actor, Server-Side Request Forgery (SSRF) vulnerability in Apache Camel in Atmosphere Websocket Component.
The camel-atmosphere-websocket consumer mapped inbound WebSocket query parameters into the Camel Exchange header map without applying any HeaderFilterStrategy (WebsocketConsumer.sendEventNotification() iterates the query-string map collected in WebsocketConsumer.service() and copies each entry into the Exchange). Because nothing blocked the Camel header namespace, a client connecting to the WebSocket endpoint could set Camel-internal control headers - including CamelHttpUri (Exchange.HTTP_URI) - simply by supplying them as query parameters. In a route where the WebSocket consumer feeds a downstream HTTP producer, the injected CamelHttpUri redirects the server-side HTTP request to an attacker-chosen destination (server-side request forgery - for example to an internal service or a cloud metadata endpoint). In addition, the HTTP producer resolves Camel property placeholders on the resulting (attacker-controlled) URI, so placeholders embedded in the injected value - such as an environment-variable reference, an application property, or a vault reference - are resolved to their real values and sent to the attacker, disclosing environment variables, application properties and vault secrets. When the WebSocket endpoint is exposed without authentication, this is reachable by an unauthenticated remote attacker.
This issue affects Apache Camel: from 4.0.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0.
Users are recommended to upgrade to version 4.21.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.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. The fix makes the consumer apply the HeaderFilterStrategy it already inherits from the HTTP/servlet stack, filtering the Camel header namespace case-insensitively on inbound mapping, so externally-supplied Camel* / camel* headers are no longer copied into the Exchange. For deployments that cannot upgrade immediately, strip the Camel control headers from the inbound message before they reach any downstream producer (for example removeHeaders('Camel*') and removeHeaders('camel*') at the start of the route), require authentication on the WebSocket endpoint, and avoid bridging an untrusted consumer directly into an HTTP producer whose target URI can be driven from message headers.
📍 영향받는 시스템
Apache Camel: 4.0.0 ~ 4.14.7, 4.15.0 ~ 4.18.2, 4.19.0 ~ 4.20.9
⚔️ 공격 벡터
인증되지 않은 원격 공격자가 WebSocket 연결 시 쿼리 파라미터에 Camel 제어 헤더(예: CamelHttpUri)를 주입하여 공격
🛡️ 대응 방법
Apache Camel을 4.21.0, 4.18.3 또는 4.14.8 이상의 최신 보안 버전으로 업그레이드하십시오.
🔧 검증 코드
출력된 Apache Camel의 버전이 취약한 범위(4.14.8 미만, 4.18.3 미만, 4.21.0 미만)에 해당하는지 확인하십시오.
mvn dependency:list | grep 'camel-core' | grep -E '4\[0-9]\.[0-9]\.[0-9]'