🇰🇷 한글 설명
Apache Camel Cometd 컴포넌트에서 입력값 검증 미흡으로 인해 발생하는 취약점입니다. 클라이언트가 전송한 Bayeux 메시지 헤더가 필터링 없이 Camel Exchange에 직접 복사되어, 공격자가 Camel 내부 제어 헤더를 주입할 수 있습니다. 이를 통해 HTTP 목적지 변경, 파일명 조작, JMS 목적지 재설정 등 라우트의 동작을 임의로 조작할 수 있습니다.
💡 쉬운 설명
외부 사용자가 시스템의 중요한 설정값을 몰래 끼워 넣어 프로그램의 동작을 마음대로 바꿀 수 있는 보안 구멍입니다. 공격자가 가짜 명령어를 섞어 보내면 데이터가 엉뚱한 곳으로 저장되거나 전달될 수 있습니다.
🇺🇸 원문 (English)
Improper Input Validation vulnerability in Apache Camel Cometd Component.
The camel-cometd component maps inbound Bayeux (CometD) message headers into the Camel Exchange without applying a HeaderFilterStrategy. CometdBinding.populateExchangeFromMessage copies the entire ext.CamelHeaders map supplied by the CometD client directly onto the Camel message (message.setHeaders), so any header name - including Camel-internal control headers such as CamelHttpUri, CamelFileName or CamelJmsDestinationName - is accepted unmodified. Because a CometdComponent installs no Bayeux SecurityPolicy by default, any client that can complete the Bayeux handshake against the CometD endpoint can publish such a message without authentication. An attacker can therefore inject arbitrary Camel control headers that influence the behaviour of downstream producers in the route (for example redirecting an HTTP producer, changing a file name, or overriding a JMS destination); the injected headers also persist across internal direct, seda and vm hops. The concrete downstream impact depends on which producers the route uses.
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 implements a HeaderFilterStrategy in the camel-cometd binding (a long-standing TODO in the code) that filters the Camel header namespace case-insensitively on inbound mapping, so client-supplied Camel* / camel* headers are no longer copied into the Exchange. For deployments that cannot upgrade immediately, strip the Camel control headers from inbound CometD messages before they reach any downstream producer (for example removeHeaders('Camel*') and removeHeaders('camel*') at the start of the route), and install an explicit Bayeux SecurityPolicy on the CometdComponent so that only authenticated clients can publish.
📍 영향받는 시스템
Apache Camel: 4.0.0 ~ 4.14.7, 4.15.0 ~ 4.18.2, 4.19.0 ~ 4.20.x
⚔️ 공격 벡터
인증되지 않은 클라이언트가 CometD 엔드포인트로 조작된 Camel 제어 헤더를 포함한 Bayeux 메시지를 전송
🛡️ 대응 방법
Apache Camel을 4.21.0, 4.14.8 또는 4.18.3 이상의 보안 패치 버전으로 업그레이드하십시오.
🔧 검증 코드
출력된 결과에서 camel-cometd의 버전이 취약한 범위(4.0.0~4.14.7, 4.15.0~4.18.2, 4.19.0~4.20.x)에 해당하는지 확인하십시오.
mvn dependency:list | grep 'camel-cometd'