
Apache Camel camel-atmosphere-websocket 디스패치 헤더 주입(CVE-2026-71300)에 대한 개념 증명(PoC) 재현 도구로, 주입된 헤더를 통해 WebSocket 메시지를 공격자가 선택한 수신자로 리다이렉트할 수 있음을 시연합니다.
Apache Camel 취약점에 대한 실행 가능한 개념 증명 재현기(reproducer)입니다. camel-atmosphere-websocket
프로듀서는 이름이 Camel 네임스페이스 밖에 속하는 websocket.* Exchange 헤더에서 WebSocket 수신자를 선택합니다.
따라서 HTTP HeaderFilterStrategy(Camel* / camel*만 제거함)가 이를 허용하며,
외부 발신자가 프로듀서의 디스패치 결정을 가로챌 수 있습니다.
| 런타임 | 디렉터리 | 스택 |
|---|---|---|
| Camel Spring Boot | camel-spring-boot/ | Spring Boot 3.5.13 + camel-atmosphere-websocket 4.18.2 |
Camel Quarkus:
camel-quarkus-atmosphere-websocket확장이 없으므로 이 컴포넌트는 Camel Quarkus에서 실행할 수 없습니다. — 재현기는 Spring Boot 전용입니다.
라우트는 HTTP 컨슈머를 atmosphere-websocket 프로듀서에 연결하여, websocket.connectionKey 헤더 자체를
설정함으로써 각 HTTP 메시지를 단일 고정 WebSocket 수신자("피해자")에게 전달합니다. 그러나
WebsocketProducer.process는 단일 키 헤더 이전에 리스트 헤더 websocket.connectionKey.list를 검사하며,
이 점으로 구분된 이름은 Camel 네임스페이스에 없으므로 HTTP 헤더 필터가 이를 제거하지 않습니다. 주입된
websocket.connectionKey.list 헤더는 따라서 요청에서 Exchange로 전달되어 고정 수신자를 덮어씁니다.
피해자에게 보내려던 메시지가 대신 공격자가 선택한 연결로 전달됩니다.
POST /notify ──► setHeader(websocket.connectionKey = victim) ──► atmosphere-websocket producer ──► victim peer
│ ▲
└─ injected header websocket.connectionKey.list: <attacker key> ───────┘ (tested first → wins)
테스트 하네스에 관하여. atmosphere WebSocket 런타임은 서블릿 컨테이너의 WebSocket 업그레이드와 프레임워크 자체 초기화가 필요하므로, 일반적인 독립 실행형 Spring Boot 앱에서는 구동할 수 없습니다. 따라서 이 재현기는 실제 HTTP 인그레스를 통한 실제
WebsocketProducer디스패치 로직을 실행합니다 — 단지 두 연결 피어는 atmosphere 프레임워크가 실제 브라우저 연결을 등록하는 것처럼 엔드포인트의WebSocketStore에 직접 등록된 대리자입니다. 헤더 필터 우회와 프로듀서 디스패치 우선순위 — 실제 취약점 — 는 실제로 실행됩니다.
cd camel-spring-boot
mvn clean package
docker compose up -d --build
curl -s http://localhost:8080/exploit/attack
docker compose down
영향을 받는 빌드에서의 예상 출력:
1) Benign POST /notify (no injected header):
victim received: [hello for the victim]
attacker received: []
2) Injected POST /notify with header 'websocket.connectionKey.list: attacker-connection-key':
victim received: []
attacker received: [private data meant for the victim, ...]
>>> PROVEN: ... delivering a message meant for the victim to an attacker-chosen WebSocket connection instead: true
보안 공지: https://camel.apache.org/security/CVE-2026-71300.html
디스패치 헤더 상수들은 Camel 네임스페이스로 이름이 변경되었습니다 — CamelAtmosphereWebsocketConnectionKey,
CamelAtmosphereWebsocketConnectionKeyList, CamelAtmosphereWebsocketSendToAll — 따라서 HTTP HeaderFilterStrategy
가 전송 경계에서 이를 제거하며 외부 발신자는 더 이상 주입할 수 없습니다. 관련된
camel-undertow 웹소켓 경로는
CVE-2026-78329로 다루어집니다.
이 저장소는 교육 및 방어 목적으로 게시되었습니다: Apache Camel 사용자가 취약점을 이해하고, 영향을 받는지 확인하며, 업그레이드로 해결되는지 확인하는 데 도움을 주기 위함입니다. 소유하거나 운영하지 않는 시스템에 이 자료를 사용하지 마십시오.
| 속성 | 값 |
|---|
| 컴포넌트 | camel-atmosphere-websocket (camel-atmosphere-websocket-starter) |
| CWE | CWE-20 (Improper Input Validation) → CWE-74 (Injection) |
| 공격 벡터 | atmosphere-websocket 프로듀서로 브리지되는 요청에 주입된 websocket.connectionKey.list (또는 websocket.connectionKey / websocket.sendToAll) 헤더 |
| 영향 | 프로듀서의 디스패치 결정을 장악 — 임의의 WebSocket 피어에게 전달하거나 전달하지 않음 |
| 영향받는 버전 | 4.0.0부터 4.14.9 미만, 4.15.0부터 4.18.4 미만, 4.19.0부터 4.22.0 미만 |
| 수정된 버전 | 4.14.9, 4.18.4, 4.22.0 |
| JIRA | CAMEL-24359 |
| 크레딧 | Barak Srour (Apiiro) |