🇰🇷 한글 설명
Apache Camel의 camel-coap 컴포넌트에서 발생하는 헤더 주입 취약점으로, CoAP 요청의 쿼리 파라미터가 검증 없이 Camel 메시지 헤더로 직접 매핑됩니다. 공격자는 이를 통해 Camel 내부 헤더를 조작하여 camel-exec와 같은 민감한 프로듀서의 동작을 제어함으로써 원격 코드 실행(RCE)을 수행할 수 있습니다.
💡 쉬운 설명
해커가 특수하게 조작된 메시지를 보내면 시스템의 내부 설정값을 마음대로 바꿀 수 있는 보안 구멍이 있습니다. 이를 통해 해커는 서버에 원격으로 명령어를 입력하여 시스템을 완전히 장악할 수 있습니다.
🇺🇸 원문 (English)
Improperly Controlled Modification of Dynamically-Determined Object Attributes vulnerability in Apache Camel Camel-Coap component.
Apache Camel's camel-coap component is vulnerable to Camel message header injection, leading to remote code execution when routes forward CoAP requests to header-sensitive producers (e.g. camel-exec)
The camel-coap component maps incoming CoAP request URI query parameters directly into Camel Exchange In message headers without applying any HeaderFilterStrategy.
Specifically, CamelCoapResource.handleRequest() iterates over OptionSet.getUriQuery() and calls camelExchange.getIn().setHeader(...) for every query parameter. CoAPEndpoint extends DefaultEndpoint rather than DefaultHeaderFilterStrategyEndpoint, and CoAPComponent does not implement HeaderFilterStrategyComponent; the component contains no references to HeaderFilterStrategy at all.
As a result, an unauthenticated attacker who can send a single CoAP UDP packet to a Camel route consuming from coap:// can inject arbitrary Camel internal headers (those prefixed with Camel*) into the Exchange. When the route delivers the message to a header-sensitive producer such as camel-exec, camel-sql, camel-bean, camel-file, or template components (camel-freemarker, camel-velocity), the injected headers can alter the producer's behavior. In the case of camel-exec, the CamelExecCommandExecutable and CamelExecCommandArgs headers override the executable and arguments configured on the endpoint, resulting in arbitrary OS command execution under the privileges of the Camel process.
The producer's output is written back to the Exchange body and returned in the CoAP response payload by CamelCoapResource, giving the attacker an interactive RCE channel without any need for out-of-band exfiltration.
Exploitation prerequisites are minimal: a single unauthenticated UDP datagram to the CoAP port (default 5683). CoAP (RFC 7252) has no built-in authentication, and DTLS is optional and disabled by default. Because the protocol is UDP-based, HTTP-layer WAF/IDS controls do not apply.
This issue affects Apache Camel: from 4.14.0 through 4.14.5, from 4.18.0 before 4.18.1, 4.19.0.
Users are recommended to upgrade to version 4.18.1 or 4.19.0, fixing the issue.
📍 영향받는 시스템
Apache Camel: 4.14.0 ~ 4.14.5, 4.18.0 (4.18.1 미만), 4.19.0
⚔️ 공격 벡터
인증되지 않은 공격자가 CoAP UDP 패킷을 통해 조작된 쿼리 파라미터를 전송하여 헤더 주입 공격 수행
🛡️ 대응 방법
Apache Camel 버전을 4.18.1 또는 4.19.1 이상으로 업그레이드
🔧 검증 코드
명령어 결과에 취약한 버전 범위가 나타나면 해당 시스템은 보안 업데이트가 필요한 상태입니다.
mvn dependency:list | grep 'camel-core' | grep -E '4.14.[0-5]|4.18.0|4.19.0'